File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -17134,10 +17134,11 @@ namespace ts {
17134
17134
case SyntaxKind.ElementAccessExpression:
17135
17135
return checkIndexedAccess(<ElementAccessExpression>node);
17136
17136
case SyntaxKind.CallExpression:
17137
- case SyntaxKind.NewExpression:
17138
17137
if ((<CallExpression>node).expression.kind === SyntaxKind.ImportKeyword) {
17139
17138
return checkImportCallExpression(<ImportCall>node);
17140
17139
}
17140
+ // Fall through
17141
+ case SyntaxKind.NewExpression:
17141
17142
return checkCallExpression(<CallExpression>node);
17142
17143
case SyntaxKind.TaggedTemplateExpression:
17143
17144
return checkTaggedTemplateExpression(<TaggedTemplateExpression>node);
Original file line number Diff line number Diff line change @@ -2416,7 +2416,7 @@ namespace ts {
2416
2416
if ( token ( ) === SyntaxKind . OpenParenToken || token ( ) === SyntaxKind . LessThanToken ) {
2417
2417
return parseSignatureMember ( SyntaxKind . CallSignature ) ;
2418
2418
}
2419
- if ( token ( ) === SyntaxKind . NewKeyword && lookAhead ( isStartOfConstructSignature ) ) {
2419
+ if ( token ( ) === SyntaxKind . NewKeyword && lookAhead ( nextTokenIsOpenParenOrLessThan ) ) {
2420
2420
return parseSignatureMember ( SyntaxKind . ConstructSignature ) ;
2421
2421
}
2422
2422
const fullStart = getNodePos ( ) ;
@@ -2427,7 +2427,7 @@ namespace ts {
2427
2427
return parsePropertyOrMethodSignature ( fullStart , modifiers ) ;
2428
2428
}
2429
2429
2430
- function isStartOfConstructSignature ( ) {
2430
+ function nextTokenIsOpenParenOrLessThan ( ) {
2431
2431
nextToken ( ) ;
2432
2432
return token ( ) === SyntaxKind . OpenParenToken || token ( ) === SyntaxKind . LessThanToken ;
2433
2433
}
@@ -5619,11 +5619,6 @@ namespace ts {
5619
5619
return nextToken ( ) === SyntaxKind . OpenParenToken ;
5620
5620
}
5621
5621
5622
- function nextTokenIsOpenParenOrLessThan ( ) {
5623
- const next = nextToken ( ) ;
5624
- return next === SyntaxKind . OpenParenToken || next === SyntaxKind . LessThanToken ;
5625
- }
5626
-
5627
5622
function nextTokenIsSlash ( ) {
5628
5623
return nextToken ( ) === SyntaxKind . SlashToken ;
5629
5624
}
Original file line number Diff line number Diff line change @@ -1199,6 +1199,10 @@ namespace ts {
1199
1199
}
1200
1200
1201
1201
function collectExternalModuleReferences ( file : SourceFile ) : void {
1202
+ if ( file . imports ) {
1203
+ return ;
1204
+ }
1205
+
1202
1206
const isJavaScriptFile = isSourceFileJavaScript ( file ) ;
1203
1207
const isExternalModuleFile = isExternalModule ( file ) ;
1204
1208
const isDtsFile = isDeclarationFile ( file ) ;
You can’t perform that action at this time.
0 commit comments