Skip to content

Commit 57b9e38

Browse files
committed
Add baselines for UMD global access
1 parent 11e4516 commit 57b9e38

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

tests/baselines/reference/umd9.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+

tests/baselines/reference/umd9.types

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+

0 commit comments

Comments
 (0)