-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Fix crash from inaccurate type guard implementation #49252
Fix crash from inaccurate type guard implementation #49252
Conversation
…ng true on binding elements
if (node.kind === SyntaxKind.BindingElement) { | ||
node = node.parent.parent; | ||
} |
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.
This is the problem code; other changes are accounting for the deletion. The issue is that this function gets consumed exclusively by functions whose return type is a predicate of node
being some sort of VariableDeclaration
, so this defeats that type predicate.
|
@typescript-bot cherry-pick this to release-4.7 |
Heya @andrewbranch, I've started to run the task to cherry-pick this into |
Hey @andrewbranch, I've opened #49272 for you. |
Component commits: 94cf127 Fix `isVariableDeclarationInitializedToBareOrAccessedRequire` returning true on binding elements fae1bbe Undo auto format change Co-authored-by: Andrew Branch <[email protected]>
Fixes 🙃 #49003 (comment)