Skip to content

Commit 90d9f3d

Browse files
committed
Rename isStartOfType parameter used by isStartOfParameter
1 parent a5c2eac commit 90d9f3d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/compiler/parser.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2238,7 +2238,7 @@ namespace ts {
22382238
isIdentifierOrPattern() ||
22392239
isModifierKind(token()) ||
22402240
token() === SyntaxKind.AtToken ||
2241-
isStartOfType(/*disableLookahead*/ true);
2241+
isStartOfType(/*inStartOfParameter*/ true);
22422242
}
22432243

22442244
function parseParameter(): ParameterDeclaration {
@@ -2699,7 +2699,7 @@ namespace ts {
26992699
}
27002700
}
27012701

2702-
function isStartOfType(disableLookahead?: boolean): boolean {
2702+
function isStartOfType(inStartOfParameter?: boolean): boolean {
27032703
switch (token()) {
27042704
case SyntaxKind.AnyKeyword:
27052705
case SyntaxKind.StringKeyword:
@@ -2729,11 +2729,11 @@ namespace ts {
27292729
case SyntaxKind.DotDotDotToken:
27302730
return true;
27312731
case SyntaxKind.MinusToken:
2732-
return !disableLookahead && lookAhead(nextTokenIsNumericLiteral);
2732+
return !inStartOfParameter && lookAhead(nextTokenIsNumericLiteral);
27332733
case SyntaxKind.OpenParenToken:
27342734
// Only consider '(' the start of a type if followed by ')', '...', an identifier, a modifier,
27352735
// or something that starts a type. We don't want to consider things like '(1)' a type.
2736-
return !disableLookahead && lookAhead(isStartOfParenthesizedOrFunctionType);
2736+
return !inStartOfParameter && lookAhead(isStartOfParenthesizedOrFunctionType);
27372737
default:
27382738
return isIdentifier();
27392739
}

0 commit comments

Comments
 (0)