Add baselines for UMD global access

This commit is contained in:
Andrew Branch 2019-04-05 11:10:02 -07:00
parent 11e45162ea
commit 57b9e38397
No known key found for this signature in database
GPG Key ID: 22CCA4B120C427D2
3 changed files with 57 additions and 0 deletions

View 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

View 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))

View 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