简体   繁体   中英

Typedoc: document only things exported by a specific file

I am developing two npn packages:

I want to document them by using typedoc. The index.js file is the one provided by the npm module and is obtained by index.ts.

I want to document only what is exported by the library index.ts. I can filter the non-exported things with the typedoc options.

The problem is that the index.ts import things from other TS files and export only some of them. For instance, it imports and re-exports some interfaces from the interfaces/index.ts and the errors classes from errors/index.ts, but imports without exporting the class Database from the utils/database/index.ts.

Being actually exported, things such that Database class are documented even if they are exported by a file different from index.ts.

How can I filter them?

The current @next version of typedoc has a --library mode. Seems that there are going to be big changes with the @beta version and the future 1.0.0 version, where the mode option will even disappear. Development seems to proceed extremely slow, so I think that the only way now is to use the (probably bugged) @next and @beta versions and wait.

Edit: the 0.20.x is no more beta and has been released, it works good, so the problem is solved

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM