-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
Add undefined to Symbol.valueDeclaration #43033
Conversation
I'm going to merge with master to avoid clashing with the declaration fix.
Also add undefined to a number of utility functions that have always accepted it, but never added it to their type.
@@ -4107,7 +4107,7 @@ declare namespace ts { | |||
function idText(identifierOrPrivateName: Identifier | PrivateIdentifier): string; | |||
function symbolName(symbol: Symbol): string; | |||
function getNameOfJSDocTypedef(declaration: JSDocTypedefTag): Identifier | PrivateIdentifier | undefined; | |||
function getNameOfDeclaration(declaration: Declaration | Expression): DeclarationName | undefined; | |||
function getNameOfDeclaration(declaration: Declaration | Expression | undefined): DeclarationName | undefined; |
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.
Not sure how I feel about changing the public API on these, but maybe it's fine.
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 think it's fine: they just make the function easier to call, and they're on functions that already return undefined
or boolean
, which implies (correctly) that they pass through undefined
if you call them.
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
Also add undefined to a number of utility functions that have always accepted it, but never added it to their type.