(I read this post , but this is from August, and it does not answer my question for the current version of typescript.)
I am currently using typescript 1.8 in my project and this works fine:
import * as Promise from "bluebird"; async function f() : Promise<void> { return Promise.delay(200); }
But if I try to compile with typescript 2.1:
index.ts(2,16): error TS1059: Return expression in async function does not have a valid callable 'then' member.
Turning to the issue of using Bluebird Promises in Typscript, I also found a lot of discussions, comments, and PR, but they are very difficult to understand, and discussing interesting points, I can not find anywhere where it says how I should get it to work now.
So how can I use Bluebird for Promises in typescript 2.1?
source share