|
1 | | -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(6,16): error TS1055: Type '{}' is not a valid async function return type. |
2 | | -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(7,16): error TS1055: Type 'any' is not a valid async function return type. |
3 | | -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(8,16): error TS1055: Type 'number' is not a valid async function return type. |
4 | | -tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(10,16): error TS1055: Type 'Thenable' is not a valid async function return type. |
| 1 | +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(6,23): error TS1064: The return type of an async function or method must be the global Promise<T>. |
| 2 | +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(7,23): error TS1064: The return type of an async function or method must be the global Promise<T>. |
| 3 | +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(8,23): error TS1064: The return type of an async function or method must be the global Promise<T>. |
| 4 | +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(9,23): error TS1064: The return type of an async function or method must be the global Promise<T>. |
| 5 | +tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(10,23): error TS1064: The return type of an async function or method must be the global Promise<T>. |
5 | 6 | tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(17,16): error TS1059: Return expression in async function does not have a valid callable 'then' member. |
6 | 7 | tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts(23,25): error TS1058: Operand for 'await' does not have a valid callable 'then' member. |
7 | 8 |
|
8 | 9 |
|
9 | | -==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts (6 errors) ==== |
| 10 | +==== tests/cases/conformance/async/es6/functionDeclarations/asyncFunctionDeclaration15_es6.ts (7 errors) ==== |
10 | 11 | declare class Thenable { then(): void; } |
11 | 12 | declare let a: any; |
12 | 13 | declare let obj: { then: string; }; |
13 | 14 | declare let thenable: Thenable; |
14 | 15 | async function fn1() { } // valid: Promise<void> |
15 | 16 | async function fn2(): { } { } // error |
16 | | - ~~~ |
17 | | -!!! error TS1055: Type '{}' is not a valid async function return type. |
| 17 | + ~~~ |
| 18 | +!!! error TS1064: The return type of an async function or method must be the global Promise<T>. |
18 | 19 | async function fn3(): any { } // error |
19 | | - ~~~ |
20 | | -!!! error TS1055: Type 'any' is not a valid async function return type. |
| 20 | + ~~~ |
| 21 | +!!! error TS1064: The return type of an async function or method must be the global Promise<T>. |
21 | 22 | async function fn4(): number { } // error |
22 | | - ~~~ |
23 | | -!!! error TS1055: Type 'number' is not a valid async function return type. |
| 23 | + ~~~~~~ |
| 24 | +!!! error TS1064: The return type of an async function or method must be the global Promise<T>. |
24 | 25 | async function fn5(): PromiseLike<void> { } // error |
| 26 | + ~~~~~~~~~~~~~~~~~ |
| 27 | +!!! error TS1064: The return type of an async function or method must be the global Promise<T>. |
25 | 28 | async function fn6(): Thenable { } // error |
26 | | - ~~~ |
27 | | -!!! error TS1055: Type 'Thenable' is not a valid async function return type. |
| 29 | + ~~~~~~~~ |
| 30 | +!!! error TS1064: The return type of an async function or method must be the global Promise<T>. |
28 | 31 | async function fn7() { return; } // valid: Promise<void> |
29 | 32 | async function fn8() { return 1; } // valid: Promise<number> |
30 | 33 | async function fn9() { return null; } // valid: Promise<any> |
|
0 commit comments