Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@category doc over class props, causes constructor to be categorized as "Other" #661

Closed
charlesLoder opened this issue Jul 30, 2024 · 3 comments
Labels
bug Issue raised as a bug.

Comments

@charlesLoder
Copy link

What package is the bug related to?

typedoc-plugin-markdown

Describe the issue

This may not be a bug, per se, but the ergonomics of it feel a little off.

If the properties of a class have the @category tag, then the constructor is no longer given the heading "Constructors"; instead, it is under the heading "Other."

One possible workaround is to give the constructor the @category tag of @category Constructor, but it will cause the "Constructor" heading to alphabetically come after other categories (e.g. "Color"). So this isn't a fix.

See minimal example and run npm run docs, which also outputs the Typedoc json.
The animalWithoutCategories.ts outputs the constructor under the right heading, and animalWithCategories.ts outputs the constructor under the heading of "Other".

TypeDoc configuration

{
  "plugin": ["typedoc-plugin-markdown"],
  "out": "./docs",
  "entryPoints": ["src/index.ts"]
}

Expected behavior

I expect that the Constructor would retain it's own unique heading, and be at the top of the page under headings like "Implements", which is not affected by alphabetical ordering. I would expect this given the importance of a constructor in a class.

@charlesLoder charlesLoder added the bug Issue raised as a bug. label Jul 30, 2024
@tgreyuk
Copy link
Member

tgreyuk commented Jul 31, 2024

Thanks - will review and fix with next release.

@tgreyuk
Copy link
Member

tgreyuk commented Aug 13, 2024

Should be fixed in typedoc-plugin-markdown@4.2.4.

@charlesLoder
Copy link
Author

It works, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue raised as a bug.
Projects
None yet
Development

No branches or pull requests

2 participants