I wish TS could check Promise resolve types, so like: foo(): Promise<boolean> { return new Promise(res => res(123)); // NO }
-
-
The inference engine isn't connecting the two normally (the return type and the constructor are really generic) 2/
-
thanks to the ability to do things like res(promiseLike) or res() 3/3
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.