File tree Expand file tree Collapse file tree 3 files changed +70
-0
lines changed Expand file tree Collapse file tree 3 files changed +70
-0
lines changed Original file line number Diff line number Diff line change 1+ //// [tests/cases/compiler/elidingImportNames.ts] ////
2+
3+ //// [elidingImportNames_test.ts]
4+
5+ import a = require ( 'elidingImportNames_main' ) ; // alias used in typeof
6+ var b = a ;
7+ var x : typeof a ;
8+ import a2 = require ( 'elidingImportNames_main1' ) ; // alias not used in typeof
9+ var b2 = a2 ;
10+
11+
12+ //// [elidingImportNames_main.ts]
13+ export var main = 10 ;
14+
15+ //// [elidingImportNames_main1.ts]
16+ export var main = 10 ;
17+
18+ //// [elidingImportNames_main.js]
19+ exports . main = 10 ;
20+ //// [elidingImportNames_main1.js]
21+ exports . main = 10 ;
22+ //// [elidingImportNames_test.js]
23+ var b = a ;
24+ var x ;
25+ var a2 = require ( 'elidingImportNames_main1' ) ; // alias not used in typeof
26+ var b2 = a2 ;
Original file line number Diff line number Diff line change 1+ === tests/cases/compiler/elidingImportNames_test.ts ===
2+
3+ import a = require('elidingImportNames_main'); // alias used in typeof
4+ >a : typeof a
5+
6+ var b = a;
7+ >b : typeof a
8+ >a : typeof a
9+
10+ var x: typeof a;
11+ >x : typeof a
12+ >a : typeof a
13+
14+ import a2 = require('elidingImportNames_main1'); // alias not used in typeof
15+ >a2 : typeof a2
16+
17+ var b2 = a2;
18+ >b2 : typeof a2
19+ >a2 : typeof a2
20+
21+
22+ === tests/cases/compiler/elidingImportNames_main.ts ===
23+ export var main = 10;
24+ >main : number
25+
26+ === tests/cases/compiler/elidingImportNames_main1.ts ===
27+ export var main = 10;
28+ >main : number
29+
Original file line number Diff line number Diff line change 1+ // @module : commonjs
2+
3+ // @Filename : elidingImportNames_test.ts
4+ import a = require( 'elidingImportNames_main' ) ; // alias used in typeof
5+ var b = a ;
6+ var x : typeof a ;
7+ import a2 = require( 'elidingImportNames_main1' ) ; // alias not used in typeof
8+ var b2 = a2 ;
9+
10+
11+ // @Filename : elidingImportNames_main.ts
12+ export var main = 10 ;
13+
14+ // @Filename : elidingImportNames_main1.ts
15+ export var main = 10 ;
You can’t perform that action at this time.
0 commit comments