-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
docgen: hoist constants using the @constant
JSDoc tag
#14292
Comments
@constant
JSDoc tag
Pulling discussion from #14266 (comment) here :
I like the first idea here. Is there any challenge to this, or downside? |
@constant
JSDoc tag@constant
JSDoc tag
@aduth We should create an issue for sorting! :)
One good thing about using the export order to sort the API would be that we could group things together: like having The downside is that it requires manual curation. I don't think we have now the amount of time required to curate all the packages. And, even if we did, I don't think we could sustain it over time: being almost at 400 contributors means a high-potential for wildly different curations of things, but also changes made by contributors unaware of the proper order. Alphabetical takes that burden out of the table. But also a strong argument for it is that API docs are reference documentation (like a dictionary, which is optimized for lookup). This is in contrast with onboarding documentation (tutorials and such), where you present the most relevant things first. Said that: I look forward to bringing more grouping abilities. This issue is just one possibility. The data module would be a good use case to explore: how can we group |
Although |
Sorry, did not mean to side-track, just seemed that sorting could supersede the need for specifically hoisting constants.
I like this argument, and your follow-up point about groupings. I can't say I have any advice to offer. The idea sounds similar to something like PHPUnit's |
One thing I had hopes in was the Bizarrely enough, what doesn't make the linter unhappy is to use our own tag A different approach would be to use the |
I'm triagging issues we don't plan to tackle. We can reopen if it regains interest. |
When generating docs for an API, constants could be grouped at the top of the API section. Suggested at #14265 (comment)
One way to implement this would be to group the symbols that are constants, as declared by the
@constant
JSDoc tag.Note the related
@const
tag.The text was updated successfully, but these errors were encountered: