From d1e9efe1265380a2d39e809768f4e7a0e4ef1bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Spie=C3=9F?= Date: Mon, 12 Feb 2018 21:46:30 +0100 Subject: [PATCH] Fix TypeScript compiler issue with fulfilled assertion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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' has no compatible call signatures.” compiler error. --- should.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/should.d.ts b/should.d.ts index 929cf33..c320bb5 100644 --- a/should.d.ts +++ b/should.d.ts @@ -163,9 +163,9 @@ declare namespace should { //promise Promise(): this; - fulfilled: Promise; - resolved: Promise; - rejected: Promise; + fulfilled(): Promise; + resolved(): Promise; + rejected(): Promise; fulfilledWith(obj: any): Promise; resolvedWith(obj: any): Promise;