-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fixes to support Generating API Documentation #4391
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
84143a9
StateValue: separate summary from remarks
audionerd 5393ea9
use `@internal` instead of `@private`
audionerd decfcf7
NonReducibleUnknown: add `@remarks`
audionerd 045fbb0
StateValue: fix list item rendering
audionerd cfa877e
StateNodeConfig.parent: remove comment
audionerd c9e9b6e
microstep: omit `@internal` and comments
audionerd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still quite unsure why we need this. RxJS has extensive and long JSDocs and they use api-extractor too but there is no
@remarks
in sight in their codebase. I wonder what's the difference? 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the index page a description is provided for each item.
With

@remarks
, we can choose to show only the first summary line in the descriptions:Without

@remarks
, the description is longer (and most of the index descriptions are a single line so this one stands out):So it’s a subjective change, but I thought it was better to have a shorter description. If you disagree I’m happy to change it back.
I had also noticed the list items weren’t formatted properly on the index, so I wanted to omit them, but I just found a fix for that I can push to this PR, so it's not a deciding factor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the API Extractor docs, it expects TSDoc and
@remarks
is specific to TSDoc, which explains why you wouldn’t see it in JSDocs. See: https://tsdoc.org/pages/tags/remarksI’m curious about how RxJS docs are set up though. I’ll take a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, OK - so actually RxJS is not using the api-extractor (my memory is failing me). I agree that a shorter summary in this table is better but I really wish that we wouldn't have to use
@remarks
for this. Despite TSDoc being a Microsoft project, VS Code doesn't handle those TSDoc tags nicely 🤷♂️I'm fine either way though - we can always revisit this in the future. I just feel that the primary use case for those JSDoc comments is the in-IDE experience and the API docs page generation comes second. We have some level of control over how API docs end up being generated as we can script whatever we want - we have 0 control over how an IDE renders its tooltips (beyond what we can configure using the JSDoC tags that it knows and understands)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point. I’ll see what I can find out about TSDocs in VS Code. Might be some ways to improve the experience.