You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(10,23): error TS1055: Type 'typeof Thenable' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.
8
8
Construct signature return types 'Thenable' and 'PromiseLike<T>' are incompatible.
9
9
The types returned by 'then(...)' are incompatible between these types.
10
-
Type 'void' is not assignable to type 'PromiseLike<TResult1 | TResult2>'.
10
+
Type 'void' is not assignable to type 'PromiseLike<(TResult1 extends PromiseLike<infer UResult1> ? UResult1 : TResult1) | (TResult2 extends PromiseLike<infer UResult2> ? UResult2 : TResult2)>'.
11
11
tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(17,16): error TS1058: The return type of an async function must either be a valid promise or must not contain a callable 'then' member.
12
12
tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(23,25): error TS1320: Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member.
!!! error TS1055: Type 'typeof Thenable' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.
40
40
!!! error TS1055: Construct signature return types 'Thenable' and 'PromiseLike<T>' are incompatible.
41
41
!!! error TS1055: The types returned by 'then(...)' are incompatible between these types.
42
-
!!! error TS1055: Type 'void' is not assignable to type 'PromiseLike<TResult1 | TResult2>'.
42
+
!!! error TS1055: Type 'void' is not assignable to type 'PromiseLike<(TResult1 extends PromiseLike<infer UResult1> ? UResult1 : TResult1) | (TResult2 extends PromiseLike<infer UResult2> ? UResult2 : TResult2)>'.
43
43
async function fn7() { return; } // valid: Promise<void>
44
44
async function fn8() { return 1; } // valid: Promise<number>
45
45
async function fn9() { return null; } // valid: Promise<any>
0 commit comments