Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

Commit

Permalink
Fix TypeScript compiler issue with fulfilled assertion
Browse files Browse the repository at this point in the history
Without this, a standard assertion like `return (new Promise(null)).should.be.fulfilled();` would fail with a “error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'Promise<any>' has no compatible call signatures.” compiler error.
  • Loading branch information
lumaxis committed Feb 12, 2018
1 parent 9dcde0f commit d1e9efe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions should.d.ts
Expand Up @@ -163,9 +163,9 @@ declare namespace should {
//promise
Promise(): this;

fulfilled: Promise<any>;
resolved: Promise<any>;
rejected: Promise<any>;
fulfilled(): Promise<any>;
resolved(): Promise<any>;
rejected(): Promise<any>;

fulfilledWith(obj: any): Promise<any>;
resolvedWith(obj: any): Promise<any>;
Expand Down

0 comments on commit d1e9efe

Please sign in to comment.