@@ -2238,7 +2238,7 @@ namespace ts {
2238
2238
isIdentifierOrPattern ( ) ||
2239
2239
isModifierKind ( token ( ) ) ||
2240
2240
token ( ) === SyntaxKind . AtToken ||
2241
- isStartOfType ( /*disableLookahead */ true ) ;
2241
+ isStartOfType ( /*inStartOfParameter */ true ) ;
2242
2242
}
2243
2243
2244
2244
function parseParameter ( ) : ParameterDeclaration {
@@ -2697,7 +2697,7 @@ namespace ts {
2697
2697
}
2698
2698
}
2699
2699
2700
- function isStartOfType ( disableLookahead ?: boolean ) : boolean {
2700
+ function isStartOfType ( inStartOfParameter ?: boolean ) : boolean {
2701
2701
switch ( token ( ) ) {
2702
2702
case SyntaxKind . AnyKeyword :
2703
2703
case SyntaxKind . StringKeyword :
@@ -2724,11 +2724,11 @@ namespace ts {
2724
2724
case SyntaxKind . AsteriskToken :
2725
2725
return true ;
2726
2726
case SyntaxKind . MinusToken :
2727
- return ! disableLookahead && lookAhead ( nextTokenIsNumericLiteral ) ;
2727
+ return ! inStartOfParameter && lookAhead ( nextTokenIsNumericLiteral ) ;
2728
2728
case SyntaxKind . OpenParenToken :
2729
2729
// Only consider '(' the start of a type if followed by ')', '...', an identifier, a modifier,
2730
2730
// or something that starts a type. We don't want to consider things like '(1)' a type.
2731
- return ! disableLookahead && lookAhead ( isStartOfParenthesizedOrFunctionType ) ;
2731
+ return ! inStartOfParameter && lookAhead ( isStartOfParenthesizedOrFunctionType ) ;
2732
2732
default :
2733
2733
return isIdentifier ( ) ;
2734
2734
}
0 commit comments