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
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'.
19
-
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:152:13: 'Promise' was also declared here.
19
+
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:74:13: 'Promise' was also declared here.
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'.
19
-
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:152:13: 'Promise' was also declared here.
19
+
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:74:13: 'Promise' was also declared here.
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'.
19
-
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:152:13: 'Promise' was also declared here.
19
+
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:74:13: 'Promise' was also declared here.
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'.
19
-
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:152:13: 'Promise' was also declared here.
19
+
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:74:13: 'Promise' was also declared here.
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'.
19
-
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:152:13: 'Promise' was also declared here.
19
+
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:74:13: 'Promise' was also declared here.
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Promise' must be of type 'PromiseConstructor', but here has type 'any'.
19
-
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:152:13: 'Promise' was also declared here.
19
+
!!! related TS6203 /.ts/lib.es2015.promise.d.ts:74:13: 'Promise' was also declared here.
tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(8,23): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value.
6
6
tests/cases/conformance/async/es5/functionDeclarations/asyncFunctionDeclaration15_es5.ts(9,23): error TS1055: Type 'PromiseLike' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.
7
7
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
-
Construct signature return types 'Thenable' and 'PromiseLike<T>' are incompatible.
8
+
Construct signature return types 'Thenable' and 'PromiseLike<T extends PromiseLike<infer U> ? U : 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
-
!!! error TS1055: Construct signature return types 'Thenable' and 'PromiseLike<T>' are incompatible.
40
+
!!! error TS1055: Construct signature return types 'Thenable' and 'PromiseLike<T extends PromiseLike<infer U> ? U : 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