Address minor PR comment
This commit is contained in:
parent
a10e668c34
commit
e50667e49e
|
@ -17134,10 +17134,11 @@ namespace ts {
|
|||
case SyntaxKind.ElementAccessExpression:
|
||||
return checkIndexedAccess(<ElementAccessExpression>node);
|
||||
case SyntaxKind.CallExpression:
|
||||
case SyntaxKind.NewExpression:
|
||||
if ((<CallExpression>node).expression.kind === SyntaxKind.ImportKeyword) {
|
||||
return checkImportCallExpression(<ImportCall>node);
|
||||
}
|
||||
// Fall through
|
||||
case SyntaxKind.NewExpression:
|
||||
return checkCallExpression(<CallExpression>node);
|
||||
case SyntaxKind.TaggedTemplateExpression:
|
||||
return checkTaggedTemplateExpression(<TaggedTemplateExpression>node);
|
||||
|
|
|
@ -2416,7 +2416,7 @@ namespace ts {
|
|||
if (token() === SyntaxKind.OpenParenToken || token() === SyntaxKind.LessThanToken) {
|
||||
return parseSignatureMember(SyntaxKind.CallSignature);
|
||||
}
|
||||
if (token() === SyntaxKind.NewKeyword && lookAhead(isStartOfConstructSignature)) {
|
||||
if (token() === SyntaxKind.NewKeyword && lookAhead(nextTokenIsOpenParenOrLessThan)) {
|
||||
return parseSignatureMember(SyntaxKind.ConstructSignature);
|
||||
}
|
||||
const fullStart = getNodePos();
|
||||
|
@ -2427,7 +2427,7 @@ namespace ts {
|
|||
return parsePropertyOrMethodSignature(fullStart, modifiers);
|
||||
}
|
||||
|
||||
function isStartOfConstructSignature() {
|
||||
function nextTokenIsOpenParenOrLessThan() {
|
||||
nextToken();
|
||||
return token() === SyntaxKind.OpenParenToken || token() === SyntaxKind.LessThanToken;
|
||||
}
|
||||
|
@ -5619,11 +5619,6 @@ namespace ts {
|
|||
return nextToken() === SyntaxKind.OpenParenToken;
|
||||
}
|
||||
|
||||
function nextTokenIsOpenParenOrLessThan() {
|
||||
const next = nextToken();
|
||||
return next === SyntaxKind.OpenParenToken || next === SyntaxKind.LessThanToken;
|
||||
}
|
||||
|
||||
function nextTokenIsSlash() {
|
||||
return nextToken() === SyntaxKind.SlashToken;
|
||||
}
|
||||
|
|
|
@ -1199,6 +1199,10 @@ namespace ts {
|
|||
}
|
||||
|
||||
function collectExternalModuleReferences(file: SourceFile): void {
|
||||
if (file.imports) {
|
||||
return;
|
||||
}
|
||||
|
||||
const isJavaScriptFile = isSourceFileJavaScript(file);
|
||||
const isExternalModuleFile = isExternalModule(file);
|
||||
const isDtsFile = isDeclarationFile(file);
|
||||
|
|
Loading…
Reference in a new issue