File tree Expand file tree Collapse file tree 3 files changed +57
-0
lines changed
tests/baselines/reference Expand file tree Collapse file tree 3 files changed +57
-0
lines changed Original file line number Diff line number Diff line change
1
+ //// [tests/cases/conformance/externalModules/umd9.ts] ////
2
+
3
+ //// [foo.d.ts]
4
+ declare class Thing {
5
+ foo ( ) : number ;
6
+ }
7
+ export = Thing ;
8
+ export as namespace Foo ;
9
+
10
+ //// [a.ts]
11
+ /// <reference path="foo.d.ts" />
12
+ export const x = Foo ; // OK in value position because allowUmdGlobalAccess: true
13
+
14
+
15
+ //// [a.js]
16
+ "use strict" ;
17
+ exports . __esModule = true ;
18
+ /// <reference path="foo.d.ts" />
19
+ exports . x = Foo ; // OK in value position because allowUmdGlobalAccess: true
Original file line number Diff line number Diff line change
1
+ === tests/cases/conformance/externalModules/a.ts ===
2
+ /// <reference path="foo.d.ts" />
3
+ export const x = Foo; // OK in value position because allowUmdGlobalAccess: true
4
+ >x : Symbol(x, Decl(a.ts, 1, 12))
5
+ >Foo : Symbol(Foo, Decl(foo.d.ts, 3, 15))
6
+
7
+ === tests/cases/conformance/externalModules/foo.d.ts ===
8
+ declare class Thing {
9
+ >Thing : Symbol(Thing, Decl(foo.d.ts, 0, 0))
10
+
11
+ foo(): number;
12
+ >foo : Symbol(Thing.foo, Decl(foo.d.ts, 0, 21))
13
+ }
14
+ export = Thing;
15
+ >Thing : Symbol(Thing, Decl(foo.d.ts, 0, 0))
16
+
17
+ export as namespace Foo;
18
+ >Foo : Symbol(Foo, Decl(foo.d.ts, 3, 15))
19
+
Original file line number Diff line number Diff line change
1
+ === tests/cases/conformance/externalModules/a.ts ===
2
+ /// <reference path="foo.d.ts" />
3
+ export const x = Foo; // OK in value position because allowUmdGlobalAccess: true
4
+ >x : typeof Thing
5
+ >Foo : typeof Thing
6
+
7
+ === tests/cases/conformance/externalModules/foo.d.ts ===
8
+ declare class Thing {
9
+ >Thing : Thing
10
+
11
+ foo(): number;
12
+ >foo : () => number
13
+ }
14
+ export = Thing;
15
+ >Thing : Thing
16
+
17
+ export as namespace Foo;
18
+ >Foo : typeof Thing
19
+
You can’t perform that action at this time.
0 commit comments