Promise.then does not accept callback that returns T | Promise<S>
#15599
Labels
Design Limitation
Constraints of the existing architecture prevent this from being fixed
TypeScript Version: 2.3.1
Code
Expected behavior:
Code is accepted and type of
p3
isPromise<string|number>
.Actual behavior:
Type Error:
Argument of type '() => Promise<string> | 0' is not assignable to parameter of type '(value: void) => string | PromiseLike<string>'.
The text was updated successfully, but these errors were encountered: