mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
Address Github #11081 when we start paring "1" in type and keep going instead of terminate when see ")"
This commit is contained in:
parent
ef17dc5741
commit
13373e41c8
@ -1380,8 +1380,8 @@ namespace ts {
|
||||
// Tokens other than ')' and ']' (the latter for index signatures) are here for better error recovery
|
||||
return token() === SyntaxKind.CloseParenToken || token() === SyntaxKind.CloseBracketToken /*|| token === SyntaxKind.OpenBraceToken*/;
|
||||
case ParsingContext.TypeArguments:
|
||||
// Tokens other than '>' are here for better error recovery
|
||||
return token() === SyntaxKind.GreaterThanToken || token() === SyntaxKind.OpenParenToken;
|
||||
// All other tokens should cause the type-argument to terminate except comma token
|
||||
return token() !== SyntaxKind.CommaToken;
|
||||
case ParsingContext.HeritageClauses:
|
||||
return token() === SyntaxKind.OpenBraceToken || token() === SyntaxKind.CloseBraceToken;
|
||||
case ParsingContext.JsxAttributes:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user