Fix unexpected TS1005 in tryParseSignature (#149)

This commit is contained in:
Max Graey
2018-06-24 02:06:31 +03:00
committed by Daniel Wirtz
parent 188b4e48ce
commit 2e5a42d233
3 changed files with 11 additions and 4 deletions

View File

@ -650,10 +650,14 @@ export class Parser extends DiagnosticEmitter {
}
} while (tn.skip(Token.COMMA));
if (!tn.skip(Token.CLOSEPAREN)) {
this.error(
DiagnosticCode._0_expected,
tn.range(), ")"
);
if (isSignature) {
this.error(
DiagnosticCode._0_expected,
tn.range(), ")"
);
} else {
tn.reset(state);
}
this.tryParseSignatureIsSignature = isSignature;
return null;
}