Update tests

This commit is contained in:
Kanchalai Tanglertsampan
2017-03-28 13:31:40 -07:00
parent 32e5cf76af
commit 249f446212
6 changed files with 32 additions and 2 deletions

View File

@@ -6,7 +6,6 @@ export class B {
}
// @filename: 2.ts
// We use Promise<any> for now as there is no way to specify shape of module object
function foo(x: Promise<any>) {
x.then(value => {
let b = new value.B();

View File

@@ -0,0 +1,17 @@
// @module: commonjs
// @target: es6
// @noImplicitAny: true
// @filename: anotherModule.ts
export class D{}
// @filename: defaultPath.ts
export class C {}
// @filename: 1.ts
import * as defaultModule from "./defaultPath";
import * as anotherModule from "./anotherModule";
let p1: Promise<typeof anotherModule> = import("./defaultPath");
let p2 = import("./defaultPath") as Promise<typeof anotherModule>;
let p3: Promise<any> = import("./defaultPath");

View File

@@ -6,5 +6,4 @@
export function foo() { return "foo"; }
// @filename: 1.ts
import("./0");
var p1 = import("./0");

View File

@@ -0,0 +1,15 @@
// @module: es2018
// @target: esnext
// @declaration: true
// @filename: 0.ts
export function foo() { return "foo"; }
// @filename: 1.ts
declare function getPath(): string;
import * as Zero from "./0";
import("./0");
export var p0: Promise<typeof Zero> = import(getPath());
export var p1: Promise<typeof Zero> = import("./0");
export var p2: Promise<any> = import("./0");