Skip to content

Conversation

@sandersn
Copy link
Member

By copying the kludge in @typedef. @callback's order is simpler, so the kludge is simpler. However, it's wrong here, and in @typedef. Parsing tag comments is normally supposed to happen at the end of a tag, but in @callback and @typedef happens before parsing the nested @param/@Property tags.

I still need to figure out what a real fix is -- but for the beta, copying the existing crash-avoidance kludge from @typedef is best anyway. I added a test case for typedefs for future use as well.

Fixes #48327

By copying the kludge in @typedef. @callback's order is simpler, so the
kludge is simpler. However, it's wrong here, and in @typedef. Parsing
tag comments is normally supposed to happen at the end of a tag, but in
@callback and @typedef happens *before* parsing the nested
@param/@Property tags.

I still need to figure out what a real fix is -- but for the beta,
copying the existing crash-avoidance kludge from @typedef is best
anyway. I added a test case for typedefs for future use as well.
@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Apr 27, 2022
@sandersn sandersn merged commit 2a78b22 into main Apr 27, 2022
@sandersn sandersn deleted the stop-tag-after-callback-crash branch April 27, 2022 18:21
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Milestone Bug PRs that fix a bug with a specific milestone

Projects

None yet

Development

Successfully merging this pull request may close these issues.

any jsdoc tag after @callback causes debug assert

4 participants