Gerrit0 / typedoc-plugin-missing-exports

MIT License
45 stars 4 forks source link

Is there any way to have the "<internal>" menu collapsed by default? #25

Closed docmattman closed 5 months ago

docmattman commented 8 months ago

The plugin works great. Definitely a huge help to have all the extra missing types available in the generated docs. However, some of my code packages contain a LOT of "internals". When I open a package from the sidebar, the <internals> submenu item is the first item in the list and it defaults to expanded. So in some cases I need to scroll down a LOT just to get past all of the internal stuff to see the actual package code docs.

Any idea how to handle this? Is there a way to have the <internals> menu collapsed by default?

Gerrit0 commented 8 months ago

TypeDoc remembers what menus you have open, and restores that when you load the page... so you'd have to use its hooks to avoid this behavior.

The easiest way to do this is have a script that looks for any localStorage items whose name starts with tsd-accordion and contains <internal> and set them to false

Gerrit0 commented 5 months ago

After some more thought, I decided that this makes sense to include as an option in this plugin, now available as --collapseInternalModule