0

I'm getting a compile error in typescript with shouldjs only when trying to use the .rejected() / .fufilled() syntax

Promise.resolve().should // is fine, is an Assertion
Promise.resolve().should.rejected // is fine, is a Function
Promise.resolve().should.rejected() // TS2349 Cannot invoke expression whose type lacks a call signature. Type Promise<any> has no compatible call signatures

I tried casting to PromisedAssertion like this: (<PromisedAssertion>Promise.resolve()) or (Promise.resolve() as PromisedAssertion) to no effect. How can I fix this?

.should works fine otherwise

Lev Kuznetsov
  • 3,520
  • 5
  • 20
  • 33

1 Answers1

0

Created an issue against should repo, in the meantime casting to any works

Lev Kuznetsov
  • 3,520
  • 5
  • 20
  • 33