Skip to content

Visit children of jsdoc type aliases in the binder #45312

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

Merged
merged 5 commits into from
Aug 4, 2021

Conversation

sandersn
Copy link
Member

@sandersn sandersn commented Aug 3, 2021

This sets up parent pointers and matches bindJSDocClassTag just below.

Fixes #45254 and almost certainly #45248, though I haven't figured out to repro the second case.

This sets up parent pointers.

Fixes #45254 and almost certainly #45248, though I haven't figured out
to repro the second case.
@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Aug 3, 2021
@sandersn
Copy link
Member Author

sandersn commented Aug 3, 2021

The tests that failed show that the name is getting double-visited. I'll need to fix that before merging.

@sandersn
Copy link
Member Author

sandersn commented Aug 3, 2021

Looking closer at the visitor code (thanks again ts-ast-viewer!), I found an incorrect parenthesis, but it doesn't fix the double-visit.

@sandersn
Copy link
Member Author

sandersn commented Aug 3, 2021

Because of the delayed nature of @typedef binding, a full visit double-visits the type name. I switched to manually setting the parent of comments. Although now that I think about it, maybe the right thing to do is to visit them.

@sandersn sandersn merged commit f1ce0f5 into main Aug 4, 2021
@sandersn sandersn deleted the visit-children-of-typedef branch August 4, 2021 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

Quick info crashes on '@typedef'
3 participants