mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-09 20:51:43 -06:00
Add baselines for UMD global access
This commit is contained in:
parent
11e45162ea
commit
57b9e38397
19
tests/baselines/reference/umd9.js
Normal file
19
tests/baselines/reference/umd9.js
Normal file
@ -0,0 +1,19 @@
|
||||
//// [tests/cases/conformance/externalModules/umd9.ts] ////
|
||||
|
||||
//// [foo.d.ts]
|
||||
declare class Thing {
|
||||
foo(): number;
|
||||
}
|
||||
export = Thing;
|
||||
export as namespace Foo;
|
||||
|
||||
//// [a.ts]
|
||||
/// <reference path="foo.d.ts" />
|
||||
export const x = Foo; // OK in value position because allowUmdGlobalAccess: true
|
||||
|
||||
|
||||
//// [a.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
/// <reference path="foo.d.ts" />
|
||||
exports.x = Foo; // OK in value position because allowUmdGlobalAccess: true
|
||||
19
tests/baselines/reference/umd9.symbols
Normal file
19
tests/baselines/reference/umd9.symbols
Normal file
@ -0,0 +1,19 @@
|
||||
=== tests/cases/conformance/externalModules/a.ts ===
|
||||
/// <reference path="foo.d.ts" />
|
||||
export const x = Foo; // OK in value position because allowUmdGlobalAccess: true
|
||||
>x : Symbol(x, Decl(a.ts, 1, 12))
|
||||
>Foo : Symbol(Foo, Decl(foo.d.ts, 3, 15))
|
||||
|
||||
=== tests/cases/conformance/externalModules/foo.d.ts ===
|
||||
declare class Thing {
|
||||
>Thing : Symbol(Thing, Decl(foo.d.ts, 0, 0))
|
||||
|
||||
foo(): number;
|
||||
>foo : Symbol(Thing.foo, Decl(foo.d.ts, 0, 21))
|
||||
}
|
||||
export = Thing;
|
||||
>Thing : Symbol(Thing, Decl(foo.d.ts, 0, 0))
|
||||
|
||||
export as namespace Foo;
|
||||
>Foo : Symbol(Foo, Decl(foo.d.ts, 3, 15))
|
||||
|
||||
19
tests/baselines/reference/umd9.types
Normal file
19
tests/baselines/reference/umd9.types
Normal file
@ -0,0 +1,19 @@
|
||||
=== tests/cases/conformance/externalModules/a.ts ===
|
||||
/// <reference path="foo.d.ts" />
|
||||
export const x = Foo; // OK in value position because allowUmdGlobalAccess: true
|
||||
>x : typeof Thing
|
||||
>Foo : typeof Thing
|
||||
|
||||
=== tests/cases/conformance/externalModules/foo.d.ts ===
|
||||
declare class Thing {
|
||||
>Thing : Thing
|
||||
|
||||
foo(): number;
|
||||
>foo : () => number
|
||||
}
|
||||
export = Thing;
|
||||
>Thing : Thing
|
||||
|
||||
export as namespace Foo;
|
||||
>Foo : typeof Thing
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user