-
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
Fixed quick fixes for inferred type predicates #58958
Fixed quick fixes for inferred type predicates #58958
Conversation
const result = typePredicateToAutoImportableTypeNode(typeChecker, importAdder, typePredicate, enclosingDeclaration, scriptTarget, declarationEmitNodeBuilderFlags | flags, { | ||
moduleResolverHost: program, | ||
trackSymbol() { | ||
return true; | ||
}, | ||
reportTruncationError() { | ||
isTruncated = true; | ||
}, | ||
}); |
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 looks pretty much the same as typeToTypeNode
; why is it that we need a second set of helpers for type predicates? Why can't typeToAutoImportableTypeNode
"just work" for these cases?
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.
Because type predicates are neither types nor type nodes 😢
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.
😭
fixes #58948