We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bda420 commit ee85178Copy full SHA for ee85178
src/compiler/parser.ts
@@ -3409,8 +3409,7 @@ namespace ts {
3409
// - "a ? (b): c" will have "(b):" parsed as a signature with a return type annotation.
3410
//
3411
// So we need just a bit of lookahead to ensure that it can only be a signature.
3412
- if (!allowAmbiguity && ((token() !== SyntaxKind.EqualsGreaterThanToken && token() !== SyntaxKind.OpenBraceToken) ||
3413
- find(node.parameters, p => p.initializer && ts.isIdentifier(p.initializer) && p.initializer.escapedText === "= not found"))) {
+ if (!allowAmbiguity && token() !== SyntaxKind.EqualsGreaterThanToken && token() !== SyntaxKind.OpenBraceToken) {
3414
// Returning undefined here will cause our caller to rewind to where we started from.
3415
return undefined;
3416
}
0 commit comments