File tree Expand file tree Collapse file tree 3 files changed +18
-11
lines changed Expand file tree Collapse file tree 3 files changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,8 @@ namespace ts {
132
132
const evolvingArrayTypes: EvolvingArrayType[] = [];
133
133
134
134
const unknownSymbol = createSymbol(SymbolFlags.Property | SymbolFlags.Transient, "unknown");
135
+ const untypedModuleSymbol = createSymbol(SymbolFlags.ValueModule, "<untyped>");
136
+ untypedModuleSymbol.exports = createMap<Symbol>();
135
137
const resolvingSymbol = createSymbol(SymbolFlags.Transient, "__resolving__");
136
138
137
139
const anyType = createIntrinsicType(TypeFlags.Any, "any");
@@ -1490,10 +1492,10 @@ namespace ts {
1490
1492
resolvedModule.resolvedFileName);
1491
1493
return undefined;
1492
1494
}
1493
- // Unlike a failed import, an untyped module produces a dummy symbol. This is checked for by `isUntypedOrShorthandAmbientModuleSymbol`.
1494
- const untypedSymbol = createSymbol(SymbolFlags.ValueModule, `"${moduleName}"`);
1495
- untypedSymbol.exports = createMap<Symbol>();
1496
- return untypedSymbol ;
1495
+ // Unlike a failed import, an untyped module produces a dummy symbol.
1496
+ // This is checked for by `isUntypedOrShorthandAmbientModuleSymbol`.
1497
+ // This must be different than `unknownSymbol` because `getBaseConstructorTypeOfClass` won't fail for `unknownSymbol`.
1498
+ return untypedModuleSymbol ;
1497
1499
}
1498
1500
1499
1501
if (moduleNotFoundError) {
Original file line number Diff line number Diff line change @@ -12,16 +12,21 @@ class A extends Foo { }
12
12
13
13
//// [a.js]
14
14
"use strict" ;
15
- var __extends = ( this && this . __extends ) || function ( d , b ) {
16
- for ( var p in b ) if ( b . hasOwnProperty ( p ) ) d [ p ] = b [ p ] ;
17
- function __ ( ) { this . constructor = d ; }
18
- d . prototype = b === null ? Object . create ( b ) : ( __ . prototype = b . prototype , new __ ( ) ) ;
19
- } ;
15
+ var __extends = ( this && this . __extends ) || ( function ( ) {
16
+ var extendStatics = Object . setPrototypeOf ||
17
+ ( { __proto__ : [ ] } instanceof Array && function ( d , b ) { d . __proto__ = b ; } ) ||
18
+ function ( d , b ) { for ( var p in b ) if ( b . hasOwnProperty ( p ) ) d [ p ] = b [ p ] ; } ;
19
+ return function ( d , b ) {
20
+ extendStatics ( d , b ) ;
21
+ function __ ( ) { this . constructor = d ; }
22
+ d . prototype = b === null ? Object . create ( b ) : ( __ . prototype = b . prototype , new __ ( ) ) ;
23
+ } ;
24
+ } ) ( ) ;
20
25
var foo_1 = require ( "foo" ) ;
21
26
var A = ( function ( _super ) {
22
27
__extends ( A , _super ) ;
23
28
function A ( ) {
24
- return _super . apply ( this , arguments ) || this ;
29
+ return _super !== null && _super . apply ( this , arguments ) || this ;
25
30
}
26
31
return A ;
27
32
} ( foo_1 [ "default" ] ) ) ;
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ verify.numberOfErrorsInCurrentFile(0);
12
12
13
13
goTo . marker ( "fooModule" ) ;
14
14
verify . goToDefinitionIs ( [ ] ) ;
15
- verify . quickInfoIs ( 'module "foo" ' ) ;
15
+ verify . quickInfoIs ( 'module <untyped> ' ) ;
16
16
verify . referencesAre ( [ ] )
17
17
18
18
goTo . marker ( "foo" ) ;
You can’t perform that action at this time.
0 commit comments