typedoc
typedoc copied to clipboard
Add New Option hiddenCategories
Search Terms
Category, @category, hide, internal,
Problem
I would like to have an additional option to hide certain categories.
There is an existing typedoc option --stripInternal based on the tag @internal.
But this is not very flexible and it is actually based on a TypeScript compiler option which causes declarations not to emit:
This is an internal compiler option; use at your own risk, because the compiler does not check that the result is valid.
Suggested Solution
I suggest adding a new typedoc option hiddenCategories which takes a list of categories as an input and ignores those when building the docs.
Without touching the source, different docs could be built for different purposes. For example, you could build docs that only cover classes that are directly used by your users, and more extensive docs for active maintainers of your project.
This is a fairly simple change:
- In utils/options/declaration.ts add the option to the
TypeDocOptionMapinterface - In utils/options/sources/typedoc.ts declare the option
- In converter/plugins/CategoryPlugin.ts check the option and use
project.removeReflectionto remove hidden reflections.
@Gerrit0 Ok, I can give it a try. I will fork the repo and try to submit a PR. If I struggle, I will let you know.
? Hope every thing is good
I am not working on this anymore ...