Skip to content

Commit 236eb1e

Browse files
committed
Rename isStartOfType parameter used by isStartOfParameter
1 parent 7f639cc commit 236eb1e

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 {
@@ -2697,7 +2697,7 @@ namespace ts {
26972697
}
26982698
}
26992699

2700-
function isStartOfType(disableLookahead?: boolean): boolean {
2700+
function isStartOfType(inStartOfParameter?: boolean): boolean {
27012701
switch (token()) {
27022702
case SyntaxKind.AnyKeyword:
27032703
case SyntaxKind.StringKeyword:
@@ -2724,11 +2724,11 @@ namespace ts {
27242724
case SyntaxKind.AsteriskToken:
27252725
return true;
27262726
case SyntaxKind.MinusToken:
2727-
return !disableLookahead && lookAhead(nextTokenIsNumericLiteral);
2727+
return !inStartOfParameter && lookAhead(nextTokenIsNumericLiteral);
27282728
case SyntaxKind.OpenParenToken:
27292729
// Only consider '(' the start of a type if followed by ')', '...', an identifier, a modifier,
27302730
// 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);
27322732
default:
27332733
return isIdentifier();
27342734
}

0 commit comments

Comments
 (0)