Skip to content
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

Merged
merged 5 commits into from
Mar 2, 2021

Conversation

sandersn
Copy link
Member

@sandersn sandersn commented Mar 2, 2021

Also add undefined to a number of utility functions that have always accepted it, but never added it to their type.

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.
@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Mar 2, 2021
@@ -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;
Copy link
Member

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.

Copy link
Member Author

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.

sandersn and others added 2 commits March 2, 2021 06:33
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants