diff --git a/tests/baselines/reference/asyncAliasReturnType_es2017.js b/tests/baselines/reference/asyncAliasReturnType_es2017.js deleted file mode 100644 index f76f2b13b45..00000000000 --- a/tests/baselines/reference/asyncAliasReturnType_es2017.js +++ /dev/null @@ -1,9 +0,0 @@ -//// [asyncAliasReturnType_es2017.ts] -type PromiseAlias = Promise; - -async function f(): PromiseAlias { -} - -//// [asyncAliasReturnType_es2017.js] -async function f() { -} diff --git a/tests/baselines/reference/asyncAliasReturnType_es2017.symbols b/tests/baselines/reference/asyncAliasReturnType_es2017.symbols deleted file mode 100644 index cc4fc5b8096..00000000000 --- a/tests/baselines/reference/asyncAliasReturnType_es2017.symbols +++ /dev/null @@ -1,11 +0,0 @@ -=== tests/cases/conformance/async/es2017/asyncAliasReturnType_es2017.ts === -type PromiseAlias = Promise; ->PromiseAlias : Symbol(PromiseAlias, Decl(asyncAliasReturnType_es2017.ts, 0, 0)) ->T : Symbol(T, Decl(asyncAliasReturnType_es2017.ts, 0, 18)) ->Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->T : Symbol(T, Decl(asyncAliasReturnType_es2017.ts, 0, 18)) - -async function f(): PromiseAlias { ->f : Symbol(f, Decl(asyncAliasReturnType_es2017.ts, 0, 34)) ->PromiseAlias : Symbol(PromiseAlias, Decl(asyncAliasReturnType_es2017.ts, 0, 0)) -} diff --git a/tests/baselines/reference/asyncAliasReturnType_es2017.types b/tests/baselines/reference/asyncAliasReturnType_es2017.types deleted file mode 100644 index 67c521b77fa..00000000000 --- a/tests/baselines/reference/asyncAliasReturnType_es2017.types +++ /dev/null @@ -1,11 +0,0 @@ -=== tests/cases/conformance/async/es2017/asyncAliasReturnType_es2017.ts === -type PromiseAlias = Promise; ->PromiseAlias : Promise ->T : T ->Promise : Promise ->T : T - -async function f(): PromiseAlias { ->f : () => Promise ->PromiseAlias : Promise -} diff --git a/tests/baselines/reference/asyncClass_es2017.errors.txt b/tests/baselines/reference/asyncClass_es2017.errors.txt deleted file mode 100644 index 37612b0b0f2..00000000000 --- a/tests/baselines/reference/asyncClass_es2017.errors.txt +++ /dev/null @@ -1,8 +0,0 @@ -tests/cases/conformance/async/es2017/asyncClass_es2017.ts(1,1): error TS1042: 'async' modifier cannot be used here. - - -==== tests/cases/conformance/async/es2017/asyncClass_es2017.ts (1 errors) ==== - async class C { - ~~~~~ -!!! error TS1042: 'async' modifier cannot be used here. - } \ No newline at end of file diff --git a/tests/baselines/reference/asyncClass_es2017.js b/tests/baselines/reference/asyncClass_es2017.js deleted file mode 100644 index e619bd50b97..00000000000 --- a/tests/baselines/reference/asyncClass_es2017.js +++ /dev/null @@ -1,7 +0,0 @@ -//// [asyncClass_es2017.ts] -async class C { -} - -//// [asyncClass_es2017.js] -async class C { -} diff --git a/tests/baselines/reference/asyncConstructor_es2017.errors.txt b/tests/baselines/reference/asyncConstructor_es2017.errors.txt deleted file mode 100644 index 3b0c1b42fa9..00000000000 --- a/tests/baselines/reference/asyncConstructor_es2017.errors.txt +++ /dev/null @@ -1,10 +0,0 @@ -tests/cases/conformance/async/es2017/asyncConstructor_es2017.ts(2,3): error TS1089: 'async' modifier cannot appear on a constructor declaration. - - -==== tests/cases/conformance/async/es2017/asyncConstructor_es2017.ts (1 errors) ==== - class C { - async constructor() { - ~~~~~ -!!! error TS1089: 'async' modifier cannot appear on a constructor declaration. - } - } \ No newline at end of file diff --git a/tests/baselines/reference/asyncConstructor_es2017.js b/tests/baselines/reference/asyncConstructor_es2017.js deleted file mode 100644 index 7dcd6ec6943..00000000000 --- a/tests/baselines/reference/asyncConstructor_es2017.js +++ /dev/null @@ -1,11 +0,0 @@ -//// [asyncConstructor_es2017.ts] -class C { - async constructor() { - } -} - -//// [asyncConstructor_es2017.js] -class C { - async constructor() { - } -} diff --git a/tests/baselines/reference/asyncDeclare_es2017.errors.txt b/tests/baselines/reference/asyncDeclare_es2017.errors.txt deleted file mode 100644 index bb74a3865d5..00000000000 --- a/tests/baselines/reference/asyncDeclare_es2017.errors.txt +++ /dev/null @@ -1,7 +0,0 @@ -tests/cases/conformance/async/es2017/asyncDeclare_es2017.ts(1,9): error TS1040: 'async' modifier cannot be used in an ambient context. - - -==== tests/cases/conformance/async/es2017/asyncDeclare_es2017.ts (1 errors) ==== - declare async function foo(): Promise; - ~~~~~ -!!! error TS1040: 'async' modifier cannot be used in an ambient context. \ No newline at end of file diff --git a/tests/baselines/reference/asyncDeclare_es2017.js b/tests/baselines/reference/asyncDeclare_es2017.js deleted file mode 100644 index 2ff588b2851..00000000000 --- a/tests/baselines/reference/asyncDeclare_es2017.js +++ /dev/null @@ -1,4 +0,0 @@ -//// [asyncDeclare_es2017.ts] -declare async function foo(): Promise; - -//// [asyncDeclare_es2017.js] diff --git a/tests/baselines/reference/asyncEnum_es2017.errors.txt b/tests/baselines/reference/asyncEnum_es2017.errors.txt deleted file mode 100644 index 8e0015d0b24..00000000000 --- a/tests/baselines/reference/asyncEnum_es2017.errors.txt +++ /dev/null @@ -1,9 +0,0 @@ -tests/cases/conformance/async/es2017/asyncEnum_es2017.ts(1,1): error TS1042: 'async' modifier cannot be used here. - - -==== tests/cases/conformance/async/es2017/asyncEnum_es2017.ts (1 errors) ==== - async enum E { - ~~~~~ -!!! error TS1042: 'async' modifier cannot be used here. - Value - } \ No newline at end of file diff --git a/tests/baselines/reference/asyncEnum_es2017.js b/tests/baselines/reference/asyncEnum_es2017.js deleted file mode 100644 index df1f846c2f9..00000000000 --- a/tests/baselines/reference/asyncEnum_es2017.js +++ /dev/null @@ -1,10 +0,0 @@ -//// [asyncEnum_es2017.ts] -async enum E { - Value -} - -//// [asyncEnum_es2017.js] -var E; -(function (E) { - E[E["Value"] = 0] = "Value"; -})(E || (E = {})); diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es2017.errors.txt b/tests/baselines/reference/asyncFunctionDeclaration15_es2017.errors.txt deleted file mode 100644 index efc1e2440bf..00000000000 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es2017.errors.txt +++ /dev/null @@ -1,48 +0,0 @@ -tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration15_es2017.ts(6,23): error TS1064: The return type of an async function or method must be the global Promise type. -tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration15_es2017.ts(7,23): error TS1064: The return type of an async function or method must be the global Promise type. -tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration15_es2017.ts(8,23): error TS1064: The return type of an async function or method must be the global Promise type. -tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration15_es2017.ts(9,23): error TS1064: The return type of an async function or method must be the global Promise type. -tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration15_es2017.ts(10,23): error TS1064: The return type of an async function or method must be the global Promise type. -tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration15_es2017.ts(17,16): error TS1059: Return expression in async function does not have a valid callable 'then' member. -tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration15_es2017.ts(23,25): error TS1058: Operand for 'await' does not have a valid callable 'then' member. - - -==== tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration15_es2017.ts (7 errors) ==== - declare class Thenable { then(): void; } - declare let a: any; - declare let obj: { then: string; }; - declare let thenable: Thenable; - async function fn1() { } // valid: Promise - async function fn2(): { } { } // error - ~~~ -!!! error TS1064: The return type of an async function or method must be the global Promise type. - async function fn3(): any { } // error - ~~~ -!!! error TS1064: The return type of an async function or method must be the global Promise type. - async function fn4(): number { } // error - ~~~~~~ -!!! error TS1064: The return type of an async function or method must be the global Promise type. - async function fn5(): PromiseLike { } // error - ~~~~~~~~~~~~~~~~~ -!!! error TS1064: The return type of an async function or method must be the global Promise type. - async function fn6(): Thenable { } // error - ~~~~~~~~ -!!! error TS1064: The return type of an async function or method must be the global Promise type. - async function fn7() { return; } // valid: Promise - async function fn8() { return 1; } // valid: Promise - async function fn9() { return null; } // valid: Promise - async function fn10() { return undefined; } // valid: Promise - async function fn11() { return a; } // valid: Promise - async function fn12() { return obj; } // valid: Promise<{ then: string; }> - async function fn13() { return thenable; } // error - ~~~~ -!!! error TS1059: Return expression in async function does not have a valid callable 'then' member. - async function fn14() { await 1; } // valid: Promise - async function fn15() { await null; } // valid: Promise - async function fn16() { await undefined; } // valid: Promise - async function fn17() { await a; } // valid: Promise - async function fn18() { await obj; } // valid: Promise - async function fn19() { await thenable; } // error - ~~~~~~~~~~~~~~ -!!! error TS1058: Operand for 'await' does not have a valid callable 'then' member. - \ No newline at end of file diff --git a/tests/baselines/reference/asyncFunctionDeclaration15_es2017.js b/tests/baselines/reference/asyncFunctionDeclaration15_es2017.js deleted file mode 100644 index 5704366025e..00000000000 --- a/tests/baselines/reference/asyncFunctionDeclaration15_es2017.js +++ /dev/null @@ -1,64 +0,0 @@ -//// [asyncFunctionDeclaration15_es2017.ts] -declare class Thenable { then(): void; } -declare let a: any; -declare let obj: { then: string; }; -declare let thenable: Thenable; -async function fn1() { } // valid: Promise -async function fn2(): { } { } // error -async function fn3(): any { } // error -async function fn4(): number { } // error -async function fn5(): PromiseLike { } // error -async function fn6(): Thenable { } // error -async function fn7() { return; } // valid: Promise -async function fn8() { return 1; } // valid: Promise -async function fn9() { return null; } // valid: Promise -async function fn10() { return undefined; } // valid: Promise -async function fn11() { return a; } // valid: Promise -async function fn12() { return obj; } // valid: Promise<{ then: string; }> -async function fn13() { return thenable; } // error -async function fn14() { await 1; } // valid: Promise -async function fn15() { await null; } // valid: Promise -async function fn16() { await undefined; } // valid: Promise -async function fn17() { await a; } // valid: Promise -async function fn18() { await obj; } // valid: Promise -async function fn19() { await thenable; } // error - - -//// [asyncFunctionDeclaration15_es2017.js] -async function fn1() { } // valid: Promise -// valid: Promise -async function fn2() { } // error -// error -async function fn3() { } // error -// error -async function fn4() { } // error -// error -async function fn5() { } // error -// error -async function fn6() { } // error -// error -async function fn7() { return; } // valid: Promise -// valid: Promise -async function fn8() { return 1; } // valid: Promise -// valid: Promise -async function fn9() { return null; } // valid: Promise -// valid: Promise -async function fn10() { return undefined; } // valid: Promise -// valid: Promise -async function fn11() { return a; } // valid: Promise -// valid: Promise -async function fn12() { return obj; } // valid: Promise<{ then: string; }> -// valid: Promise<{ then: string; }> -async function fn13() { return thenable; } // error -// error -async function fn14() { await 1; } // valid: Promise -// valid: Promise -async function fn15() { await null; } // valid: Promise -// valid: Promise -async function fn16() { await undefined; } // valid: Promise -// valid: Promise -async function fn17() { await a; } // valid: Promise -// valid: Promise -async function fn18() { await obj; } // valid: Promise -// valid: Promise -async function fn19() { await thenable; } // error diff --git a/tests/baselines/reference/asyncGetter_es2017.errors.txt b/tests/baselines/reference/asyncGetter_es2017.errors.txt deleted file mode 100644 index 386e95d5977..00000000000 --- a/tests/baselines/reference/asyncGetter_es2017.errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -tests/cases/conformance/async/es2017/asyncGetter_es2017.ts(2,3): error TS1042: 'async' modifier cannot be used here. -tests/cases/conformance/async/es2017/asyncGetter_es2017.ts(2,13): error TS2378: A 'get' accessor must return a value. - - -==== tests/cases/conformance/async/es2017/asyncGetter_es2017.ts (2 errors) ==== - class C { - async get foo() { - ~~~~~ -!!! error TS1042: 'async' modifier cannot be used here. - ~~~ -!!! error TS2378: A 'get' accessor must return a value. - } - } \ No newline at end of file diff --git a/tests/baselines/reference/asyncGetter_es2017.js b/tests/baselines/reference/asyncGetter_es2017.js deleted file mode 100644 index ad8fa347cb5..00000000000 --- a/tests/baselines/reference/asyncGetter_es2017.js +++ /dev/null @@ -1,11 +0,0 @@ -//// [asyncGetter_es2017.ts] -class C { - async get foo() { - } -} - -//// [asyncGetter_es2017.js] -class C { - async get foo() { - } -} diff --git a/tests/baselines/reference/asyncImportedPromise_es2017.errors.txt b/tests/baselines/reference/asyncImportedPromise_es2017.errors.txt deleted file mode 100644 index a0348b2e691..00000000000 --- a/tests/baselines/reference/asyncImportedPromise_es2017.errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -tests/cases/conformance/async/es2017/test.ts(3,25): error TS1064: The return type of an async function or method must be the global Promise type. - - -==== tests/cases/conformance/async/es2017/task.ts (0 errors) ==== - export class Task extends Promise { } - -==== tests/cases/conformance/async/es2017/test.ts (1 errors) ==== - import { Task } from "./task"; - class Test { - async example(): Task { return; } - ~~~~~~~ -!!! error TS1064: The return type of an async function or method must be the global Promise type. - } \ No newline at end of file diff --git a/tests/baselines/reference/asyncImportedPromise_es2017.js b/tests/baselines/reference/asyncImportedPromise_es2017.js deleted file mode 100644 index a48c58c1707..00000000000 --- a/tests/baselines/reference/asyncImportedPromise_es2017.js +++ /dev/null @@ -1,21 +0,0 @@ -//// [tests/cases/conformance/async/es2017/asyncImportedPromise_es2017.ts] //// - -//// [task.ts] -export class Task extends Promise { } - -//// [test.ts] -import { Task } from "./task"; -class Test { - async example(): Task { return; } -} - -//// [task.js] -"use strict"; -class Task extends Promise { -} -exports.Task = Task; -//// [test.js] -"use strict"; -class Test { - async example() { return; } -} diff --git a/tests/baselines/reference/asyncInterface_es2017.errors.txt b/tests/baselines/reference/asyncInterface_es2017.errors.txt deleted file mode 100644 index dfbc8789797..00000000000 --- a/tests/baselines/reference/asyncInterface_es2017.errors.txt +++ /dev/null @@ -1,8 +0,0 @@ -tests/cases/conformance/async/es2017/asyncInterface_es2017.ts(1,1): error TS1042: 'async' modifier cannot be used here. - - -==== tests/cases/conformance/async/es2017/asyncInterface_es2017.ts (1 errors) ==== - async interface I { - ~~~~~ -!!! error TS1042: 'async' modifier cannot be used here. - } \ No newline at end of file diff --git a/tests/baselines/reference/asyncInterface_es2017.js b/tests/baselines/reference/asyncInterface_es2017.js deleted file mode 100644 index 4d897389538..00000000000 --- a/tests/baselines/reference/asyncInterface_es2017.js +++ /dev/null @@ -1,5 +0,0 @@ -//// [asyncInterface_es2017.ts] -async interface I { -} - -//// [asyncInterface_es2017.js] diff --git a/tests/baselines/reference/asyncModule_es2017.errors.txt b/tests/baselines/reference/asyncModule_es2017.errors.txt deleted file mode 100644 index 8b6a4c3dc66..00000000000 --- a/tests/baselines/reference/asyncModule_es2017.errors.txt +++ /dev/null @@ -1,8 +0,0 @@ -tests/cases/conformance/async/es2017/asyncModule_es2017.ts(1,1): error TS1042: 'async' modifier cannot be used here. - - -==== tests/cases/conformance/async/es2017/asyncModule_es2017.ts (1 errors) ==== - async module M { - ~~~~~ -!!! error TS1042: 'async' modifier cannot be used here. - } \ No newline at end of file diff --git a/tests/baselines/reference/asyncModule_es2017.js b/tests/baselines/reference/asyncModule_es2017.js deleted file mode 100644 index fe3e17d5e74..00000000000 --- a/tests/baselines/reference/asyncModule_es2017.js +++ /dev/null @@ -1,5 +0,0 @@ -//// [asyncModule_es2017.ts] -async module M { -} - -//// [asyncModule_es2017.js] diff --git a/tests/baselines/reference/asyncMultiFile_es2017.js b/tests/baselines/reference/asyncMultiFile_es2017.js deleted file mode 100644 index 804a58e4b4c..00000000000 --- a/tests/baselines/reference/asyncMultiFile_es2017.js +++ /dev/null @@ -1,11 +0,0 @@ -//// [tests/cases/conformance/async/es2017/asyncMultiFile_es2017.ts] //// - -//// [a.ts] -async function f() {} -//// [b.ts] -function g() { } - -//// [a.js] -async function f() { } -//// [b.js] -function g() { } diff --git a/tests/baselines/reference/asyncMultiFile_es2017.symbols b/tests/baselines/reference/asyncMultiFile_es2017.symbols deleted file mode 100644 index 9d8ff6dbe85..00000000000 --- a/tests/baselines/reference/asyncMultiFile_es2017.symbols +++ /dev/null @@ -1,8 +0,0 @@ -=== tests/cases/conformance/async/es2017/a.ts === -async function f() {} ->f : Symbol(f, Decl(a.ts, 0, 0)) - -=== tests/cases/conformance/async/es2017/b.ts === -function g() { } ->g : Symbol(g, Decl(b.ts, 0, 0)) - diff --git a/tests/baselines/reference/asyncMultiFile_es2017.types b/tests/baselines/reference/asyncMultiFile_es2017.types deleted file mode 100644 index e1f8da34c94..00000000000 --- a/tests/baselines/reference/asyncMultiFile_es2017.types +++ /dev/null @@ -1,8 +0,0 @@ -=== tests/cases/conformance/async/es2017/a.ts === -async function f() {} ->f : () => Promise - -=== tests/cases/conformance/async/es2017/b.ts === -function g() { } ->g : () => void - diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es2017.errors.txt b/tests/baselines/reference/asyncQualifiedReturnType_es2017.errors.txt deleted file mode 100644 index b9027c36539..00000000000 --- a/tests/baselines/reference/asyncQualifiedReturnType_es2017.errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -tests/cases/conformance/async/es2017/asyncQualifiedReturnType_es2017.ts(6,21): error TS1064: The return type of an async function or method must be the global Promise type. - - -==== tests/cases/conformance/async/es2017/asyncQualifiedReturnType_es2017.ts (1 errors) ==== - namespace X { - export class MyPromise extends Promise { - } - } - - async function f(): X.MyPromise { - ~~~~~~~~~~~~~~~~~ -!!! error TS1064: The return type of an async function or method must be the global Promise type. - } \ No newline at end of file diff --git a/tests/baselines/reference/asyncQualifiedReturnType_es2017.js b/tests/baselines/reference/asyncQualifiedReturnType_es2017.js deleted file mode 100644 index 164a4fef610..00000000000 --- a/tests/baselines/reference/asyncQualifiedReturnType_es2017.js +++ /dev/null @@ -1,18 +0,0 @@ -//// [asyncQualifiedReturnType_es2017.ts] -namespace X { - export class MyPromise extends Promise { - } -} - -async function f(): X.MyPromise { -} - -//// [asyncQualifiedReturnType_es2017.js] -var X; -(function (X) { - class MyPromise extends Promise { - } - X.MyPromise = MyPromise; -})(X || (X = {})); -async function f() { -} diff --git a/tests/baselines/reference/asyncSetter_es2017.errors.txt b/tests/baselines/reference/asyncSetter_es2017.errors.txt deleted file mode 100644 index 0acd8538f20..00000000000 --- a/tests/baselines/reference/asyncSetter_es2017.errors.txt +++ /dev/null @@ -1,10 +0,0 @@ -tests/cases/conformance/async/es2017/asyncSetter_es2017.ts(2,3): error TS1042: 'async' modifier cannot be used here. - - -==== tests/cases/conformance/async/es2017/asyncSetter_es2017.ts (1 errors) ==== - class C { - async set foo(value) { - ~~~~~ -!!! error TS1042: 'async' modifier cannot be used here. - } - } \ No newline at end of file diff --git a/tests/baselines/reference/asyncSetter_es2017.js b/tests/baselines/reference/asyncSetter_es2017.js deleted file mode 100644 index 8260c5232a2..00000000000 --- a/tests/baselines/reference/asyncSetter_es2017.js +++ /dev/null @@ -1,11 +0,0 @@ -//// [asyncSetter_es2017.ts] -class C { - async set foo(value) { - } -} - -//// [asyncSetter_es2017.js] -class C { - async set foo(value) { - } -} diff --git a/tests/baselines/reference/awaitUnion_es2017.js b/tests/baselines/reference/awaitUnion_es2017.js deleted file mode 100644 index 12f8b95a652..00000000000 --- a/tests/baselines/reference/awaitUnion_es2017.js +++ /dev/null @@ -1,22 +0,0 @@ -//// [awaitUnion_es2017.ts] -declare let a: number | string; -declare let b: PromiseLike | PromiseLike; -declare let c: PromiseLike; -declare let d: number | PromiseLike; -declare let e: number | PromiseLike; -async function f() { - let await_a = await a; - let await_b = await b; - let await_c = await c; - let await_d = await d; - let await_e = await e; -} - -//// [awaitUnion_es2017.js] -async function f() { - let await_a = await a; - let await_b = await b; - let await_c = await c; - let await_d = await d; - let await_e = await e; -} diff --git a/tests/baselines/reference/awaitUnion_es2017.symbols b/tests/baselines/reference/awaitUnion_es2017.symbols deleted file mode 100644 index e70abce4f0b..00000000000 --- a/tests/baselines/reference/awaitUnion_es2017.symbols +++ /dev/null @@ -1,44 +0,0 @@ -=== tests/cases/conformance/async/es2017/awaitUnion_es2017.ts === -declare let a: number | string; ->a : Symbol(a, Decl(awaitUnion_es2017.ts, 0, 11)) - -declare let b: PromiseLike | PromiseLike; ->b : Symbol(b, Decl(awaitUnion_es2017.ts, 1, 11)) ->PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --)) ->PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --)) - -declare let c: PromiseLike; ->c : Symbol(c, Decl(awaitUnion_es2017.ts, 2, 11)) ->PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --)) - -declare let d: number | PromiseLike; ->d : Symbol(d, Decl(awaitUnion_es2017.ts, 3, 11)) ->PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --)) - -declare let e: number | PromiseLike; ->e : Symbol(e, Decl(awaitUnion_es2017.ts, 4, 11)) ->PromiseLike : Symbol(PromiseLike, Decl(lib.es5.d.ts, --, --)) - -async function f() { ->f : Symbol(f, Decl(awaitUnion_es2017.ts, 4, 53)) - - let await_a = await a; ->await_a : Symbol(await_a, Decl(awaitUnion_es2017.ts, 6, 4)) ->a : Symbol(a, Decl(awaitUnion_es2017.ts, 0, 11)) - - let await_b = await b; ->await_b : Symbol(await_b, Decl(awaitUnion_es2017.ts, 7, 4)) ->b : Symbol(b, Decl(awaitUnion_es2017.ts, 1, 11)) - - let await_c = await c; ->await_c : Symbol(await_c, Decl(awaitUnion_es2017.ts, 8, 4)) ->c : Symbol(c, Decl(awaitUnion_es2017.ts, 2, 11)) - - let await_d = await d; ->await_d : Symbol(await_d, Decl(awaitUnion_es2017.ts, 9, 4)) ->d : Symbol(d, Decl(awaitUnion_es2017.ts, 3, 11)) - - let await_e = await e; ->await_e : Symbol(await_e, Decl(awaitUnion_es2017.ts, 10, 4)) ->e : Symbol(e, Decl(awaitUnion_es2017.ts, 4, 11)) -} diff --git a/tests/baselines/reference/awaitUnion_es2017.types b/tests/baselines/reference/awaitUnion_es2017.types deleted file mode 100644 index 58f8a4ec4b4..00000000000 --- a/tests/baselines/reference/awaitUnion_es2017.types +++ /dev/null @@ -1,49 +0,0 @@ -=== tests/cases/conformance/async/es2017/awaitUnion_es2017.ts === -declare let a: number | string; ->a : string | number - -declare let b: PromiseLike | PromiseLike; ->b : PromiseLike | PromiseLike ->PromiseLike : PromiseLike ->PromiseLike : PromiseLike - -declare let c: PromiseLike; ->c : PromiseLike ->PromiseLike : PromiseLike - -declare let d: number | PromiseLike; ->d : number | PromiseLike ->PromiseLike : PromiseLike - -declare let e: number | PromiseLike; ->e : number | PromiseLike ->PromiseLike : PromiseLike - -async function f() { ->f : () => Promise - - let await_a = await a; ->await_a : string | number ->await a : string | number ->a : string | number - - let await_b = await b; ->await_b : string | number ->await b : string | number ->b : PromiseLike | PromiseLike - - let await_c = await c; ->await_c : string | number ->await c : string | number ->c : PromiseLike - - let await_d = await d; ->await_d : string | number ->await d : string | number ->d : number | PromiseLike - - let await_e = await e; ->await_e : string | number ->await e : string | number ->e : number | PromiseLike -} diff --git a/tests/baselines/reference/es2017basicAsync.js b/tests/baselines/reference/es2017basicAsync.js index b19eaa4b0ba..d0443c1899c 100644 --- a/tests/baselines/reference/es2017basicAsync.js +++ b/tests/baselines/reference/es2017basicAsync.js @@ -8,7 +8,7 @@ async function asyncFunc() { await 0; } -const asycnArrowFunc = async (): Promise => { +const asyncArrowFunc = async (): Promise => { await 0; } @@ -54,7 +54,7 @@ async () => { async function asyncFunc() { await 0; } -const asycnArrowFunc = async () => { +const asyncArrowFunc = async () => { await 0; }; async function asyncIIFE() { diff --git a/tests/baselines/reference/es2017basicAsync.symbols b/tests/baselines/reference/es2017basicAsync.symbols index 75f4d2cfa76..d79faf1502a 100644 --- a/tests/baselines/reference/es2017basicAsync.symbols +++ b/tests/baselines/reference/es2017basicAsync.symbols @@ -12,8 +12,8 @@ async function asyncFunc() { await 0; } -const asycnArrowFunc = async (): Promise => { ->asycnArrowFunc : Symbol(asycnArrowFunc, Decl(es2017basicAsync.ts, 9, 5)) +const asyncArrowFunc = async (): Promise => { +>asyncArrowFunc : Symbol(asyncArrowFunc, Decl(es2017basicAsync.ts, 9, 5)) >Promise : Symbol(Promise, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) await 0; diff --git a/tests/baselines/reference/es2017basicAsync.types b/tests/baselines/reference/es2017basicAsync.types index 71c2dbe50f3..30d19cb4dfe 100644 --- a/tests/baselines/reference/es2017basicAsync.types +++ b/tests/baselines/reference/es2017basicAsync.types @@ -17,8 +17,8 @@ async function asyncFunc() { >0 : 0 } -const asycnArrowFunc = async (): Promise => { ->asycnArrowFunc : () => Promise +const asyncArrowFunc = async (): Promise => { +>asyncArrowFunc : () => Promise >async (): Promise => { await 0;} : () => Promise >Promise : Promise diff --git a/tests/cases/compiler/es2017basicAsync.ts b/tests/cases/compiler/es2017basicAsync.ts index b13a5d29bc0..b08ee6a18ae 100644 --- a/tests/cases/compiler/es2017basicAsync.ts +++ b/tests/cases/compiler/es2017basicAsync.ts @@ -10,7 +10,7 @@ async function asyncFunc() { await 0; } -const asycnArrowFunc = async (): Promise => { +const asyncArrowFunc = async (): Promise => { await 0; } diff --git a/tests/cases/conformance/async/es2017/asyncAliasReturnType_es2017.ts b/tests/cases/conformance/async/es2017/asyncAliasReturnType_es2017.ts deleted file mode 100644 index 87bbc42e166..00000000000 --- a/tests/cases/conformance/async/es2017/asyncAliasReturnType_es2017.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @target: es2017 -// @noEmitHelpers: true -type PromiseAlias = Promise; - -async function f(): PromiseAlias { -} \ No newline at end of file diff --git a/tests/cases/conformance/async/es2017/asyncClass_es2017.ts b/tests/cases/conformance/async/es2017/asyncClass_es2017.ts deleted file mode 100644 index 78746c972d0..00000000000 --- a/tests/cases/conformance/async/es2017/asyncClass_es2017.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @target: es2017 -// @noEmitHelpers: true -async class C { -} \ No newline at end of file diff --git a/tests/cases/conformance/async/es2017/asyncConstructor_es2017.ts b/tests/cases/conformance/async/es2017/asyncConstructor_es2017.ts deleted file mode 100644 index 874c0b99239..00000000000 --- a/tests/cases/conformance/async/es2017/asyncConstructor_es2017.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @target: es2017 -// @noEmitHelpers: true -class C { - async constructor() { - } -} \ No newline at end of file diff --git a/tests/cases/conformance/async/es2017/asyncDeclare_es2017.ts b/tests/cases/conformance/async/es2017/asyncDeclare_es2017.ts deleted file mode 100644 index d7fd4888fed..00000000000 --- a/tests/cases/conformance/async/es2017/asyncDeclare_es2017.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @target: es2017 -// @noEmitHelpers: true -declare async function foo(): Promise; \ No newline at end of file diff --git a/tests/cases/conformance/async/es2017/asyncEnum_es2017.ts b/tests/cases/conformance/async/es2017/asyncEnum_es2017.ts deleted file mode 100644 index dc995206e84..00000000000 --- a/tests/cases/conformance/async/es2017/asyncEnum_es2017.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @target: es2017 -// @noEmitHelpers: true -async enum E { - Value -} \ No newline at end of file diff --git a/tests/cases/conformance/async/es2017/asyncGetter_es2017.ts b/tests/cases/conformance/async/es2017/asyncGetter_es2017.ts deleted file mode 100644 index 340c33138cf..00000000000 --- a/tests/cases/conformance/async/es2017/asyncGetter_es2017.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @target: es2017 -// @noEmitHelpers: true -class C { - async get foo() { - } -} \ No newline at end of file diff --git a/tests/cases/conformance/async/es2017/asyncImportedPromise_es2017.ts b/tests/cases/conformance/async/es2017/asyncImportedPromise_es2017.ts deleted file mode 100644 index 81f5b690edd..00000000000 --- a/tests/cases/conformance/async/es2017/asyncImportedPromise_es2017.ts +++ /dev/null @@ -1,10 +0,0 @@ -// @target: es2017 -// @module: commonjs -// @filename: task.ts -export class Task extends Promise { } - -// @filename: test.ts -import { Task } from "./task"; -class Test { - async example(): Task { return; } -} \ No newline at end of file diff --git a/tests/cases/conformance/async/es2017/asyncInterface_es2017.ts b/tests/cases/conformance/async/es2017/asyncInterface_es2017.ts deleted file mode 100644 index 252730f9ff6..00000000000 --- a/tests/cases/conformance/async/es2017/asyncInterface_es2017.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @target: es2017 -// @noEmitHelpers: true -async interface I { -} \ No newline at end of file diff --git a/tests/cases/conformance/async/es2017/asyncModule_es2017.ts b/tests/cases/conformance/async/es2017/asyncModule_es2017.ts deleted file mode 100644 index 7c577e27fb9..00000000000 --- a/tests/cases/conformance/async/es2017/asyncModule_es2017.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @target: es2017 -// @noEmitHelpers: true -async module M { -} \ No newline at end of file diff --git a/tests/cases/conformance/async/es2017/asyncMultiFile_es2017.ts b/tests/cases/conformance/async/es2017/asyncMultiFile_es2017.ts deleted file mode 100644 index 920bdfb8bda..00000000000 --- a/tests/cases/conformance/async/es2017/asyncMultiFile_es2017.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @target: es2017 -// @filename: a.ts -async function f() {} -// @filename: b.ts -function g() { } \ No newline at end of file diff --git a/tests/cases/conformance/async/es2017/asyncQualifiedReturnType_es2017.ts b/tests/cases/conformance/async/es2017/asyncQualifiedReturnType_es2017.ts deleted file mode 100644 index 95695168cea..00000000000 --- a/tests/cases/conformance/async/es2017/asyncQualifiedReturnType_es2017.ts +++ /dev/null @@ -1,9 +0,0 @@ -// @target: es2017 -// @noEmitHelpers: true -namespace X { - export class MyPromise extends Promise { - } -} - -async function f(): X.MyPromise { -} \ No newline at end of file diff --git a/tests/cases/conformance/async/es2017/asyncSetter_es2017.ts b/tests/cases/conformance/async/es2017/asyncSetter_es2017.ts deleted file mode 100644 index 658c07d42e8..00000000000 --- a/tests/cases/conformance/async/es2017/asyncSetter_es2017.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @target: es2017 -// @noEmitHelpers: true -class C { - async set foo(value) { - } -} \ No newline at end of file diff --git a/tests/cases/conformance/async/es2017/awaitUnion_es2017.ts b/tests/cases/conformance/async/es2017/awaitUnion_es2017.ts deleted file mode 100644 index 493aa838ffe..00000000000 --- a/tests/cases/conformance/async/es2017/awaitUnion_es2017.ts +++ /dev/null @@ -1,14 +0,0 @@ -// @target: es2017 -// @noEmitHelpers: true -declare let a: number | string; -declare let b: PromiseLike | PromiseLike; -declare let c: PromiseLike; -declare let d: number | PromiseLike; -declare let e: number | PromiseLike; -async function f() { - let await_a = await a; - let await_b = await b; - let await_c = await c; - let await_d = await d; - let await_e = await e; -} \ No newline at end of file diff --git a/tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration15_es2017.ts b/tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration15_es2017.ts deleted file mode 100644 index 2585dc666f4..00000000000 --- a/tests/cases/conformance/async/es2017/functionDeclarations/asyncFunctionDeclaration15_es2017.ts +++ /dev/null @@ -1,25 +0,0 @@ -// @target: es2017 -// @noEmitHelpers: true -declare class Thenable { then(): void; } -declare let a: any; -declare let obj: { then: string; }; -declare let thenable: Thenable; -async function fn1() { } // valid: Promise -async function fn2(): { } { } // error -async function fn3(): any { } // error -async function fn4(): number { } // error -async function fn5(): PromiseLike { } // error -async function fn6(): Thenable { } // error -async function fn7() { return; } // valid: Promise -async function fn8() { return 1; } // valid: Promise -async function fn9() { return null; } // valid: Promise -async function fn10() { return undefined; } // valid: Promise -async function fn11() { return a; } // valid: Promise -async function fn12() { return obj; } // valid: Promise<{ then: string; }> -async function fn13() { return thenable; } // error -async function fn14() { await 1; } // valid: Promise -async function fn15() { await null; } // valid: Promise -async function fn16() { await undefined; } // valid: Promise -async function fn17() { await a; } // valid: Promise -async function fn18() { await obj; } // valid: Promise -async function fn19() { await thenable; } // error