Skip to content

Simplify tryDeleteDeclaration#24808

Merged
1 commit merged into
masterfrom
tryDeleteDeclaration
Jun 11, 2018
Merged

Simplify tryDeleteDeclaration#24808
1 commit merged into
masterfrom
tryDeleteDeclaration

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Jun 8, 2018

token.kind is always Identifier, StringLiteral or NumberLiteral. The case SyntaxKind.PropertyDeclaration: and case SyntaxKind.NamespaceImport: cases were thus dead code. Those aren't token kinds, so theoretically we could have caught this by having a type for tokens.
Simplified the code by going into tryDeleteIdentifier directly; tryDeleteDefault is now only called in one place and makes sense to inline.

@ghost ghost force-pushed the tryDeleteDeclaration branch from 4bf9ff1 to 8e05458 Compare June 8, 2018 23:49
@ghost ghost merged commit ed20f7d into master Jun 11, 2018
@ghost ghost deleted the tryDeleteDeclaration branch June 11, 2018 20:10
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant