Rename test file with ES2018 to ESNext

This commit is contained in:
Yui T
2017-06-04 21:08:05 -07:00
parent 3118afe9bc
commit 75aa4bdbcc
17 changed files with 90 additions and 90 deletions

View File

@@ -1,39 +0,0 @@
=== tests/cases/conformance/es2018/dynamicImport/0.ts ===
export function foo() { return "foo"; }
>foo : () => string
>"foo" : "foo"
=== tests/cases/conformance/es2018/dynamicImport/1.ts ===
import("./0");
>import("./0") : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
>"./0" : "./0"
var p1 = import("./0");
>p1 : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
>"./0" : "./0"
p1.then(zero => {
>p1.then(zero => { return zero.foo();}) : Promise<string>
>p1.then : <TResult1 = typeof "tests/cases/conformance/es2018/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
>then : <TResult1 = typeof "tests/cases/conformance/es2018/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/es2018/dynamicImport/0") => string
>zero : typeof "tests/cases/conformance/es2018/dynamicImport/0"
return zero.foo();
>zero.foo() : string
>zero.foo : () => string
>zero : typeof "tests/cases/conformance/es2018/dynamicImport/0"
>foo : () => string
})
function foo() {
>foo : () => void
const p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
>"./0" : "./0"
}

View File

@@ -1,4 +1,4 @@
//// [tests/cases/conformance/es2018/dynamicImport/importCallExpression1ES2018.ts] ////
//// [tests/cases/conformance/dynamicImport/importCallExpression1ESNext.ts] ////
//// [0.ts]
export function foo() { return "foo"; }

View File

@@ -1,8 +1,8 @@
=== tests/cases/conformance/es2018/dynamicImport/0.ts ===
=== tests/cases/conformance/dynamicImport/0.ts ===
export function foo() { return "foo"; }
>foo : Symbol(foo, Decl(0.ts, 0, 0))
=== tests/cases/conformance/es2018/dynamicImport/1.ts ===
=== tests/cases/conformance/dynamicImport/1.ts ===
import("./0");
var p1 = import("./0");
>p1 : Symbol(p1, Decl(1.ts, 1, 3))

View File

@@ -0,0 +1,39 @@
=== tests/cases/conformance/dynamicImport/0.ts ===
export function foo() { return "foo"; }
>foo : () => string
>"foo" : "foo"
=== tests/cases/conformance/dynamicImport/1.ts ===
import("./0");
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>"./0" : "./0"
var p1 = import("./0");
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>"./0" : "./0"
p1.then(zero => {
>p1.then(zero => { return zero.foo();}) : Promise<string>
>p1.then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>p1 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/dynamicImport/0") => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
return zero.foo();
>zero.foo() : string
>zero.foo : () => string
>zero : typeof "tests/cases/conformance/dynamicImport/0"
>foo : () => string
})
function foo() {
>foo : () => void
const p2 = import("./0");
>p2 : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>"./0" : "./0"
}

View File

@@ -1,4 +1,4 @@
//// [tests/cases/conformance/es2018/dynamicImport/importCallExpression2ES2018.ts] ////
//// [tests/cases/conformance/dynamicImport/importCallExpression2ESNext.ts] ////
//// [0.ts]
export class B {

View File

@@ -1,4 +1,4 @@
=== tests/cases/conformance/es2018/dynamicImport/0.ts ===
=== tests/cases/conformance/dynamicImport/0.ts ===
export class B {
>B : Symbol(B, Decl(0.ts, 0, 0))
@@ -6,7 +6,7 @@ export class B {
>print : Symbol(B.print, Decl(0.ts, 0, 16))
}
=== tests/cases/conformance/es2018/dynamicImport/2.ts ===
=== tests/cases/conformance/dynamicImport/2.ts ===
function foo(x: Promise<any>) {
>foo : Symbol(foo, Decl(2.ts, 0, 0))
>x : Symbol(x, Decl(2.ts, 0, 13))

View File

@@ -1,4 +1,4 @@
=== tests/cases/conformance/es2018/dynamicImport/0.ts ===
=== tests/cases/conformance/dynamicImport/0.ts ===
export class B {
>B : B
@@ -7,7 +7,7 @@ export class B {
>"I am B" : "I am B"
}
=== tests/cases/conformance/es2018/dynamicImport/2.ts ===
=== tests/cases/conformance/dynamicImport/2.ts ===
function foo(x: Promise<any>) {
>foo : (x: Promise<any>) => void
>x : Promise<any>
@@ -40,6 +40,6 @@ function foo(x: Promise<any>) {
foo(import("./0"));
>foo(import("./0")) : void
>foo : (x: Promise<any>) => void
>import("./0") : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>"./0" : "./0"

View File

@@ -1,4 +1,4 @@
//// [tests/cases/conformance/es2018/dynamicImport/importCallExpression3ES2018.ts] ////
//// [tests/cases/conformance/dynamicImport/importCallExpression3ESNext.ts] ////
//// [0.ts]
export class B {

View File

@@ -1,4 +1,4 @@
=== tests/cases/conformance/es2018/dynamicImport/0.ts ===
=== tests/cases/conformance/dynamicImport/0.ts ===
export class B {
>B : Symbol(B, Decl(0.ts, 0, 0))
@@ -6,7 +6,7 @@ export class B {
>print : Symbol(B.print, Decl(0.ts, 0, 16))
}
=== tests/cases/conformance/es2018/dynamicImport/2.ts ===
=== tests/cases/conformance/dynamicImport/2.ts ===
async function foo() {
>foo : Symbol(foo, Decl(2.ts, 0, 0))

View File

@@ -1,4 +1,4 @@
=== tests/cases/conformance/es2018/dynamicImport/0.ts ===
=== tests/cases/conformance/dynamicImport/0.ts ===
export class B {
>B : B
@@ -7,16 +7,16 @@ export class B {
>"I am B" : "I am B"
}
=== tests/cases/conformance/es2018/dynamicImport/2.ts ===
=== tests/cases/conformance/dynamicImport/2.ts ===
async function foo() {
>foo : () => Promise<void>
class C extends (await import("./0")).B {}
>C : C
>(await import("./0")).B : B
>(await import("./0")) : typeof "tests/cases/conformance/es2018/dynamicImport/0"
>await import("./0") : typeof "tests/cases/conformance/es2018/dynamicImport/0"
>import("./0") : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
>(await import("./0")) : typeof "tests/cases/conformance/dynamicImport/0"
>await import("./0") : typeof "tests/cases/conformance/dynamicImport/0"
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>"./0" : "./0"
>B : typeof B

View File

@@ -1,4 +1,4 @@
//// [tests/cases/conformance/es2018/dynamicImport/importCallExpression4ES2018.ts] ////
//// [tests/cases/conformance/dynamicImport/importCallExpression4ESNext.ts] ////
//// [0.ts]
export class B {

View File

@@ -1,4 +1,4 @@
=== tests/cases/conformance/es2018/dynamicImport/0.ts ===
=== tests/cases/conformance/dynamicImport/0.ts ===
export class B {
>B : Symbol(B, Decl(0.ts, 0, 0))
@@ -9,11 +9,11 @@ export class B {
export function foo() { return "foo" }
>foo : Symbol(foo, Decl(0.ts, 2, 1))
=== tests/cases/conformance/es2018/dynamicImport/1.ts ===
=== tests/cases/conformance/dynamicImport/1.ts ===
export function backup() { return "backup"; }
>backup : Symbol(backup, Decl(1.ts, 0, 0))
=== tests/cases/conformance/es2018/dynamicImport/2.ts ===
=== tests/cases/conformance/dynamicImport/2.ts ===
declare var console: any;
>console : Symbol(console, Decl(2.ts, 0, 11))

View File

@@ -1,4 +1,4 @@
=== tests/cases/conformance/es2018/dynamicImport/0.ts ===
=== tests/cases/conformance/dynamicImport/0.ts ===
export class B {
>B : B
@@ -11,12 +11,12 @@ export function foo() { return "foo" }
>foo : () => string
>"foo" : "foo"
=== tests/cases/conformance/es2018/dynamicImport/1.ts ===
=== tests/cases/conformance/dynamicImport/1.ts ===
export function backup() { return "backup"; }
>backup : () => string
>"backup" : "backup"
=== tests/cases/conformance/es2018/dynamicImport/2.ts ===
=== tests/cases/conformance/dynamicImport/2.ts ===
declare var console: any;
>console : any
@@ -24,8 +24,8 @@ class C {
>C : C
private myModule = import("./0");
>myModule : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
>myModule : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>import("./0") : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>"./0" : "./0"
method() {
@@ -33,13 +33,13 @@ class C {
this.myModule.then(Zero => {
>this.myModule.then(Zero => { console.log(Zero.foo()); }, async err => { console.log(err); let one = await import("./1"); console.log(one.backup()); }) : Promise<void>
>this.myModule.then : <TResult1 = typeof "tests/cases/conformance/es2018/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>this.myModule : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
>this.myModule.then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>this.myModule : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>this : this
>myModule : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
>then : <TResult1 = typeof "tests/cases/conformance/es2018/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/es2018/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/es2018/dynamicImport/0") => void
>Zero : typeof "tests/cases/conformance/es2018/dynamicImport/0"
>myModule : Promise<typeof "tests/cases/conformance/dynamicImport/0">
>then : <TResult1 = typeof "tests/cases/conformance/dynamicImport/0", TResult2 = never>(onfulfilled?: (value: typeof "tests/cases/conformance/dynamicImport/0") => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
>Zero => { console.log(Zero.foo()); } : (Zero: typeof "tests/cases/conformance/dynamicImport/0") => void
>Zero : typeof "tests/cases/conformance/dynamicImport/0"
console.log(Zero.foo());
>console.log(Zero.foo()) : any
@@ -48,7 +48,7 @@ class C {
>log : any
>Zero.foo() : string
>Zero.foo : () => string
>Zero : typeof "tests/cases/conformance/es2018/dynamicImport/0"
>Zero : typeof "tests/cases/conformance/dynamicImport/0"
>foo : () => string
}, async err => {
@@ -63,9 +63,9 @@ class C {
>err : any
let one = await import("./1");
>one : typeof "tests/cases/conformance/es2018/dynamicImport/1"
>await import("./1") : typeof "tests/cases/conformance/es2018/dynamicImport/1"
>import("./1") : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/1">
>one : typeof "tests/cases/conformance/dynamicImport/1"
>await import("./1") : typeof "tests/cases/conformance/dynamicImport/1"
>import("./1") : Promise<typeof "tests/cases/conformance/dynamicImport/1">
>"./1" : "./1"
console.log(one.backup());
@@ -75,7 +75,7 @@ class C {
>log : any
>one.backup() : string
>one.backup : () => string
>one : typeof "tests/cases/conformance/es2018/dynamicImport/1"
>one : typeof "tests/cases/conformance/dynamicImport/1"
>backup : () => string
});

View File

@@ -1,20 +1,20 @@
tests/cases/conformance/es2018/dynamicImport/2.ts(3,23): error TS7036: Dynamic import's specifier must be of type 'string', but here has type '"./0" | undefined'.
tests/cases/conformance/es2018/dynamicImport/2.ts(4,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'.
tests/cases/conformance/es2018/dynamicImport/2.ts(5,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type '"./1" | null'.
tests/cases/conformance/es2018/dynamicImport/2.ts(6,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'null'.
tests/cases/conformance/dynamicImport/2.ts(3,23): error TS7036: Dynamic import's specifier must be of type 'string', but here has type '"./0" | undefined'.
tests/cases/conformance/dynamicImport/2.ts(4,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'.
tests/cases/conformance/dynamicImport/2.ts(5,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type '"./1" | null'.
tests/cases/conformance/dynamicImport/2.ts(6,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'null'.
==== tests/cases/conformance/es2018/dynamicImport/0.ts (0 errors) ====
==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ====
export class B {
print() { return "I am B"}
}
export function foo() { return "foo" }
==== tests/cases/conformance/es2018/dynamicImport/1.ts (0 errors) ====
==== tests/cases/conformance/dynamicImport/1.ts (0 errors) ====
export function backup() { return "backup"; }
==== tests/cases/conformance/es2018/dynamicImport/2.ts (4 errors) ====
==== tests/cases/conformance/dynamicImport/2.ts (4 errors) ====
declare function bar(): boolean;
const specify = bar() ? "./0" : undefined;
let myModule = import(specify);

View File

@@ -1,4 +1,4 @@
//// [tests/cases/conformance/es2018/dynamicImport/importCallExpression5ES2018.ts] ////
//// [tests/cases/conformance/dynamicImport/importCallExpression5ESNext.ts] ////
//// [0.ts]
export class B {

View File

@@ -1,18 +1,18 @@
tests/cases/conformance/es2018/dynamicImport/2.ts(4,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'.
tests/cases/conformance/es2018/dynamicImport/2.ts(6,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'null'.
tests/cases/conformance/dynamicImport/2.ts(4,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'undefined'.
tests/cases/conformance/dynamicImport/2.ts(6,24): error TS7036: Dynamic import's specifier must be of type 'string', but here has type 'null'.
==== tests/cases/conformance/es2018/dynamicImport/0.ts (0 errors) ====
==== tests/cases/conformance/dynamicImport/0.ts (0 errors) ====
export class B {
print() { return "I am B"}
}
export function foo() { return "foo" }
==== tests/cases/conformance/es2018/dynamicImport/1.ts (0 errors) ====
==== tests/cases/conformance/dynamicImport/1.ts (0 errors) ====
export function backup() { return "backup"; }
==== tests/cases/conformance/es2018/dynamicImport/2.ts (2 errors) ====
==== tests/cases/conformance/dynamicImport/2.ts (2 errors) ====
declare function bar(): boolean;
const specify = bar() ? "./0" : undefined;
let myModule = import(specify);

View File

@@ -1,4 +1,4 @@
//// [tests/cases/conformance/es2018/dynamicImport/importCallExpression6ES2018.ts] ////
//// [tests/cases/conformance/dynamicImport/importCallExpression6ESNext.ts] ////
//// [0.ts]
export class B {