Skip to content

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.

sandersn added 3 commits March 1, 2021 14:39
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
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.

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.

6 participants