Skip to content

Commit f3306db

Browse files
author
Kanchalai Tanglertsampan
committed
Update baselines
1 parent 249f446 commit f3306db

71 files changed

Lines changed: 3138 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//// [tests/cases/conformance/es2018/dynamicImport/importCallExpression1ES2018.ts] ////
2+
3+
//// [0.ts]
4+
export function foo() { return "foo"; }
5+
6+
//// [1.ts]
7+
import("./0");
8+
var p1 = import("./0");
9+
p1.then(zero => {
10+
return zero.foo();
11+
})
12+
13+
function foo() {
14+
const p2 = import("./0");
15+
}
16+
17+
//// [0.js]
18+
export function foo() { return "foo"; }
19+
//// [1.js]
20+
import("./0");
21+
var p1 = import("./0");
22+
p1.then(zero => {
23+
return zero.foo();
24+
});
25+
function foo() {
26+
const p2 = import("./0");
27+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
=== tests/cases/conformance/es2018/dynamicImport/0.ts ===
2+
export function foo() { return "foo"; }
3+
>foo : Symbol(foo, Decl(0.ts, 0, 0))
4+
5+
=== tests/cases/conformance/es2018/dynamicImport/1.ts ===
6+
import("./0");
7+
var p1 = import("./0");
8+
>p1 : Symbol(p1, Decl(1.ts, 1, 3))
9+
10+
p1.then(zero => {
11+
>p1.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --))
12+
>p1 : Symbol(p1, Decl(1.ts, 1, 3))
13+
>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --))
14+
>zero : Symbol(zero, Decl(1.ts, 2, 8))
15+
16+
return zero.foo();
17+
>zero.foo : Symbol(foo, Decl(0.ts, 0, 0))
18+
>zero : Symbol(zero, Decl(1.ts, 2, 8))
19+
>foo : Symbol(foo, Decl(0.ts, 0, 0))
20+
21+
})
22+
23+
function foo() {
24+
>foo : Symbol(foo, Decl(1.ts, 4, 2))
25+
26+
const p2 = import("./0");
27+
>p2 : Symbol(p2, Decl(1.ts, 7, 9))
28+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
=== tests/cases/conformance/es2018/dynamicImport/0.ts ===
2+
export function foo() { return "foo"; }
3+
>foo : () => string
4+
>"foo" : "foo"
5+
6+
=== tests/cases/conformance/es2018/dynamicImport/1.ts ===
7+
import("./0");
8+
>import("./0") : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
9+
>"./0" : "./0"
10+
11+
var p1 = import("./0");
12+
>p1 : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
13+
>import("./0") : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
14+
>"./0" : "./0"
15+
16+
p1.then(zero => {
17+
>p1.then(zero => { return zero.foo();}) : Promise<string>
18+
>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>
19+
>p1 : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
20+
>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>
21+
>zero => { return zero.foo();} : (zero: typeof "tests/cases/conformance/es2018/dynamicImport/0") => string
22+
>zero : typeof "tests/cases/conformance/es2018/dynamicImport/0"
23+
24+
return zero.foo();
25+
>zero.foo() : string
26+
>zero.foo : () => string
27+
>zero : typeof "tests/cases/conformance/es2018/dynamicImport/0"
28+
>foo : () => string
29+
30+
})
31+
32+
function foo() {
33+
>foo : () => void
34+
35+
const p2 = import("./0");
36+
>p2 : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
37+
>import("./0") : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
38+
>"./0" : "./0"
39+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//// [tests/cases/conformance/es2018/dynamicImport/importCallExpression2ES2018.ts] ////
2+
3+
//// [0.ts]
4+
export class B {
5+
print() { return "I am B"}
6+
}
7+
8+
//// [2.ts]
9+
function foo(x: Promise<any>) {
10+
x.then(value => {
11+
let b = new value.B();
12+
b.print();
13+
})
14+
}
15+
16+
foo(import("./0"));
17+
18+
//// [0.js]
19+
export class B {
20+
print() { return "I am B"; }
21+
}
22+
//// [2.js]
23+
function foo(x) {
24+
x.then(value => {
25+
let b = new value.B();
26+
b.print();
27+
});
28+
}
29+
foo(import("./0"));
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
=== tests/cases/conformance/es2018/dynamicImport/0.ts ===
2+
export class B {
3+
>B : Symbol(B, Decl(0.ts, 0, 0))
4+
5+
print() { return "I am B"}
6+
>print : Symbol(B.print, Decl(0.ts, 0, 16))
7+
}
8+
9+
=== tests/cases/conformance/es2018/dynamicImport/2.ts ===
10+
function foo(x: Promise<any>) {
11+
>foo : Symbol(foo, Decl(2.ts, 0, 0))
12+
>x : Symbol(x, Decl(2.ts, 0, 13))
13+
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --))
14+
15+
x.then(value => {
16+
>x.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --))
17+
>x : Symbol(x, Decl(2.ts, 0, 13))
18+
>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --))
19+
>value : Symbol(value, Decl(2.ts, 1, 11))
20+
21+
let b = new value.B();
22+
>b : Symbol(b, Decl(2.ts, 2, 11))
23+
>value : Symbol(value, Decl(2.ts, 1, 11))
24+
25+
b.print();
26+
>b : Symbol(b, Decl(2.ts, 2, 11))
27+
28+
})
29+
}
30+
31+
foo(import("./0"));
32+
>foo : Symbol(foo, Decl(2.ts, 0, 0))
33+
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
=== tests/cases/conformance/es2018/dynamicImport/0.ts ===
2+
export class B {
3+
>B : B
4+
5+
print() { return "I am B"}
6+
>print : () => string
7+
>"I am B" : "I am B"
8+
}
9+
10+
=== tests/cases/conformance/es2018/dynamicImport/2.ts ===
11+
function foo(x: Promise<any>) {
12+
>foo : (x: Promise<any>) => void
13+
>x : Promise<any>
14+
>Promise : Promise<T>
15+
16+
x.then(value => {
17+
>x.then(value => { let b = new value.B(); b.print(); }) : Promise<void>
18+
>x.then : <TResult1 = any, TResult2 = never>(onfulfilled?: (value: any) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
19+
>x : Promise<any>
20+
>then : <TResult1 = any, TResult2 = never>(onfulfilled?: (value: any) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>) => Promise<TResult1 | TResult2>
21+
>value => { let b = new value.B(); b.print(); } : (value: any) => void
22+
>value : any
23+
24+
let b = new value.B();
25+
>b : any
26+
>new value.B() : any
27+
>value.B : any
28+
>value : any
29+
>B : any
30+
31+
b.print();
32+
>b.print() : any
33+
>b.print : any
34+
>b : any
35+
>print : any
36+
37+
})
38+
}
39+
40+
foo(import("./0"));
41+
>foo(import("./0")) : void
42+
>foo : (x: Promise<any>) => void
43+
>import("./0") : Promise<typeof "tests/cases/conformance/es2018/dynamicImport/0">
44+
>"./0" : "./0"
45+
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
//// [tests/cases/conformance/es2018/dynamicImport/importCallExpression4ES2018.ts] ////
2+
3+
//// [0.ts]
4+
export class B {
5+
print() { return "I am B"}
6+
}
7+
8+
export function foo() { return "foo" }
9+
10+
//// [1.ts]
11+
export function backup() { return "backup"; }
12+
13+
//// [2.ts]
14+
declare var console: any;
15+
class C {
16+
private myModule = import("./0");
17+
method() {
18+
this.myModule.then(Zero => {
19+
console.log(Zero.foo());
20+
}, async err => {
21+
console.log(err);
22+
let one = await import("./1");
23+
console.log(one.backup());
24+
});
25+
}
26+
}
27+
28+
//// [0.js]
29+
export class B {
30+
print() { return "I am B"; }
31+
}
32+
export function foo() { return "foo"; }
33+
//// [1.js]
34+
export function backup() { return "backup"; }
35+
//// [2.js]
36+
class C {
37+
constructor() {
38+
this.myModule = import("./0");
39+
}
40+
method() {
41+
this.myModule.then(Zero => {
42+
console.log(Zero.foo());
43+
}, async (err) => {
44+
console.log(err);
45+
let one = await import("./1");
46+
console.log(one.backup());
47+
});
48+
}
49+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
=== tests/cases/conformance/es2018/dynamicImport/0.ts ===
2+
export class B {
3+
>B : Symbol(B, Decl(0.ts, 0, 0))
4+
5+
print() { return "I am B"}
6+
>print : Symbol(B.print, Decl(0.ts, 0, 16))
7+
}
8+
9+
export function foo() { return "foo" }
10+
>foo : Symbol(foo, Decl(0.ts, 2, 1))
11+
12+
=== tests/cases/conformance/es2018/dynamicImport/1.ts ===
13+
export function backup() { return "backup"; }
14+
>backup : Symbol(backup, Decl(1.ts, 0, 0))
15+
16+
=== tests/cases/conformance/es2018/dynamicImport/2.ts ===
17+
declare var console: any;
18+
>console : Symbol(console, Decl(2.ts, 0, 11))
19+
20+
class C {
21+
>C : Symbol(C, Decl(2.ts, 0, 25))
22+
23+
private myModule = import("./0");
24+
>myModule : Symbol(C.myModule, Decl(2.ts, 1, 9))
25+
26+
method() {
27+
>method : Symbol(C.method, Decl(2.ts, 2, 37))
28+
29+
this.myModule.then(Zero => {
30+
>this.myModule.then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --))
31+
>this.myModule : Symbol(C.myModule, Decl(2.ts, 1, 9))
32+
>this : Symbol(C, Decl(2.ts, 0, 25))
33+
>myModule : Symbol(C.myModule, Decl(2.ts, 1, 9))
34+
>then : Symbol(Promise.then, Decl(lib.es5.d.ts, --, --))
35+
>Zero : Symbol(Zero, Decl(2.ts, 4, 27))
36+
37+
console.log(Zero.foo());
38+
>console : Symbol(console, Decl(2.ts, 0, 11))
39+
>Zero.foo : Symbol(foo, Decl(0.ts, 2, 1))
40+
>Zero : Symbol(Zero, Decl(2.ts, 4, 27))
41+
>foo : Symbol(foo, Decl(0.ts, 2, 1))
42+
43+
}, async err => {
44+
>err : Symbol(err, Decl(2.ts, 6, 16))
45+
46+
console.log(err);
47+
>console : Symbol(console, Decl(2.ts, 0, 11))
48+
>err : Symbol(err, Decl(2.ts, 6, 16))
49+
50+
let one = await import("./1");
51+
>one : Symbol(one, Decl(2.ts, 8, 15))
52+
53+
console.log(one.backup());
54+
>console : Symbol(console, Decl(2.ts, 0, 11))
55+
>one.backup : Symbol(backup, Decl(1.ts, 0, 0))
56+
>one : Symbol(one, Decl(2.ts, 8, 15))
57+
>backup : Symbol(backup, Decl(1.ts, 0, 0))
58+
59+
});
60+
}
61+
}

0 commit comments

Comments
 (0)