typedoc2md / typedoc-plugin-markdown

A plugin for TypeDoc that enables TypeScript API documentation to be generated in Markdown.
https://typedoc-plugin-markdown.org
MIT License
725 stars 177 forks source link

Make object documentation less verbose #703

Open norswap opened 1 month ago

norswap commented 1 month ago

What package is the feature request related to?

typedoc-plugin-markdown

Background

I have an exported variable that is a deeply nested const object.

Using "expandObjects": true, I get a very pleasant code representation of my object in the docs.

However, every property gets listed in a way that is very noisy (every property gets its own title and section, as well as every sub-property, etc etc).

Example: https://happychain.pages.dev/react/api/variables/chains#type-declaration

Proposed solution

An option that lets us choose between

tgreyuk commented 4 weeks ago

Thank you. This does seem like a reasonable suggestion and will have a look at including some kind of configuration around this.

tgreyuk commented 4 days ago

@norswap I have been having a look at this. One thing I am exploring is simply replacing the entire "Type declaration" section with the source from the ts compiler exposed by the option typeDeclarationFormat: "source".

In your use-case you would see something like this:

Screenshot 2024-11-18 at 12 05 15

Would you find this kind of solution satisfactory?

norswap commented 3 days ago

Yes, that seems perfect :)