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

Cascade namespace tags to individual API members in rendered doc #2056

Closed
erikadoyle opened this issue Sep 9, 2022 · 4 comments
Closed

Cascade namespace tags to individual API members in rendered doc #2056

erikadoyle opened this issue Sep 9, 2022 · 4 comments
Labels
enhancement Improved functionality
Milestone

Comments

@erikadoyle
Copy link

Search Terms

tag namespace cascade

Problem

In using Typedoc to generate reference documentation for the Microsoft Teams JavaScript client library, we occasionally create documentation bugs when a developer tags a namespace (as @deprecated, or @beta, for example) and then forgets to manually tag each individual member API with that same tag. As some of our generated documentation pages are rather long, our customers might not notice (or realize) that the entire namespace (implying all member API too) are marked for a certain state.

Suggested Solution

The team building the @microsoft/teams-js library would like to propose a Typedoc enhancement whereby tagging a namespace then applies the same tag to constituent member API sections of the doc as well, perhaps overridden by any tags specified directly on individual API members in source. Thanks for your consideration!

@erikadoyle erikadoyle added the enhancement Improved functionality label Sep 9, 2022
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Sep 18, 2022

It seems reasonable to me to cascade modifier tags (likely to all children, not just namespace children)... There probably needs to be a way to configure mutually exclusive tags, since otherwise there wouldn't be a way to tell if a @beta tag on a namespace copied to a class with @alpha should take precedence.

This might need to wait until 0.24 for a breaking change - TypeDoc's treatment of @public would be really bad to cascade... I've been wanting to change this for a while.

@Gerrit0 Gerrit0 mentioned this issue Mar 10, 2023
8 tasks
@Gerrit0 Gerrit0 added this to the v0.26.0 milestone May 5, 2024
@Gerrit0
Copy link
Collaborator

Gerrit0 commented May 5, 2024

I ended up deciding as a first pass to make the mutually exclusive configuration present only in TypeDoc's source code, can always make it an option if someone needs it in the future, but start simple..

In 0.26, this will be controlled by the --cascadedModifierTags option, which defaults to copying "@alpha", "@beta", "@experimental"

Gerrit0 added a commit that referenced this issue May 5, 2024
@Gerrit0 Gerrit0 mentioned this issue May 5, 2024
7 tasks
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jun 16, 2024

Fixed with TypeDoc 0.26, which is releasing 2024/06/21

@Gerrit0 Gerrit0 closed this as completed Jun 16, 2024
@erikadoyle
Copy link
Author

Thanks so much @Gerrit0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improved functionality
Projects
None yet
Development

No branches or pull requests

2 participants