microsoft / rushstack

Monorepo for tools developed by the Rush Stack community
https://rushstack.io/
Other
5.93k stars 595 forks source link

[api-extractor] Feature Request: Include additional tags in API reports #4988

Open Josmithr opened 6 days ago

Josmithr commented 6 days ago

API-Extractor automatically includes release tags and a few other selected tags (e.g., @sealed) on API members in the API reports it generates. We would like to be able to configure this to include additional tags, including custom TSDoc tags.

Ideally, we could specify something like:

...
"apiReport": {
    "enabled": true,
    ...
    "tags-to-report": ["@sealed", "@virtual", "@foo", "@bar", ...],
},
...

And the generated report would list those tags above any API member in the report whose TSDoc comment contains those tags.

For now, our immediate need would be met with just modifier tags, but I could also see use in reporting other TSDoc tag kinds, so restricting this feature to only modifier tags probably doesn't make sense.

ahnpnl commented 2 days ago

I'm using workaround by doing the following:

octogonz commented 1 day ago

@Josmithr and I looked at this on Friday. Although a bit of further discussion is needed to decide the config setting (should it be inheritable?), the feature makes sense to me. 👍 It also seems easy to implement.

If someone has time to make a PR, let me know, and we can work together to finish the design.