Skip to content

Commit

Permalink
Handle missing parameter named in isValidDeclarationForTupleLabel
Browse files Browse the repository at this point in the history
  • Loading branch information
weswigham committed May 14, 2020
1 parent a7aa566 commit e3a1cb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27046,7 +27046,7 @@ namespace ts {
}

function isValidDeclarationForTupleLabel(d: Declaration): d is NamedTupleMember | (ParameterDeclaration & { name: Identifier }) {
return d.kind === SyntaxKind.NamedTupleMember || (isParameter(d) && isIdentifier(d.name));
return d.kind === SyntaxKind.NamedTupleMember || (isParameter(d) && d.name && isIdentifier(d.name));
}

function getNameableDeclarationAtPosition(signature: Signature, pos: number) {
Expand Down

0 comments on commit e3a1cb1

Please sign in to comment.