mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-25 02:50:59 -05:00
Update tests
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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");
|
||||
@@ -6,5 +6,4 @@
|
||||
export function foo() { return "foo"; }
|
||||
|
||||
// @filename: 1.ts
|
||||
import("./0");
|
||||
var p1 = import("./0");
|
||||
@@ -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");
|
||||
Reference in New Issue
Block a user