Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluebird Promise is not awaitable #31

Open
felixfbecker opened this issue Sep 16, 2016 · 8 comments
Open

Bluebird Promise is not awaitable #31

felixfbecker opened this issue Sep 16, 2016 · 8 comments
Labels

Comments

@felixfbecker
Copy link

Operand for 'await' does not have a valid callable 'then' member

@blakeembrey
Copy link
Member

What version of TypeScript are you using? See #29 which broke compatibility with earlier TypeScript versions 😦

@felixfbecker
Copy link
Author

"earlier" means latest?!

@felixfbecker
Copy link
Author

We should add a test for await

@blakeembrey
Copy link
Member

Sadly, I'm pretty sure, yes. Definitely should. The tests here definitely need improving to at least TypeScript latest and TypeScript next.

@felixfbecker
Copy link
Author

felixfbecker commented Sep 16, 2016

But if we have to decide between supporting next and latest we should always chose latest. Btw why exactly is it incompatible on 1.8 but not on 2.0?

@blakeembrey
Copy link
Member

@felixfbecker Because the "thenable" signature changed. I also agree with you, I didn't know if would break things when I merged it. I already have a proposal in there which is compatible with both too.

@felixfbecker
Copy link
Author

felixfbecker commented Jun 8, 2017

I have a similar error again:

const x: Bluebird<void> = Bluebird.resolve(Promise.resolve(123))
const x: Bluebird<void> = Bluebird.resolve((async () => {
  // whatever
})())
Type 'Bluebird<Promise<void>>' is not assignable to type 'Bluebird<void>'.
  Type 'Bluebird<Promise<void>>' is not assignable to type 'Bluebird<void>'.
    Type 'Promise<void>' is not assignable to type 'void'.

@sebLopezCot
Copy link

Any word on fixing this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants