From a859959abc029e7b44c0a599eb85172facb6d0ce Mon Sep 17 00:00:00 2001 From: Vilmos Ioo Date: Thu, 26 Jan 2017 16:56:03 +0000 Subject: [PATCH 1/3] Added callsFake method on SinonStub --- sinon/index.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/sinon/index.d.ts b/sinon/index.d.ts index 966c7229d0..b80c13a696 100644 --- a/sinon/index.d.ts +++ b/sinon/index.d.ts @@ -109,6 +109,7 @@ declare namespace Sinon { callsArgOnAsync(index: number, context: any): SinonStub; callsArgWithAsync(index: number, ...args: any[]): SinonStub; callsArgOnWithAsync(index: number, context: any, ...args: any[]): SinonStub; + callsFake(func: any): SinonStub; onCall(n: number): SinonStub; onFirstCall(): SinonStub; onSecondCall(): SinonStub; From fb08851a25f29a204d33e6ac45642c64acc341c0 Mon Sep 17 00:00:00 2001 From: Vilmos Ioo Date: Fri, 27 Jan 2017 11:02:08 +0000 Subject: [PATCH 2/3] Allowing any arguments to be passed for callsFake --- sinon/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sinon/index.d.ts b/sinon/index.d.ts index b80c13a696..be0d3820bb 100644 --- a/sinon/index.d.ts +++ b/sinon/index.d.ts @@ -109,7 +109,7 @@ declare namespace Sinon { callsArgOnAsync(index: number, context: any): SinonStub; callsArgWithAsync(index: number, ...args: any[]): SinonStub; callsArgOnWithAsync(index: number, context: any, ...args: any[]): SinonStub; - callsFake(func: any): SinonStub; + callsFake(...args: any[]): SinonStub; onCall(n: number): SinonStub; onFirstCall(): SinonStub; onSecondCall(): SinonStub; From f59657e7a749dce43aead1dc64967c5f2eb2842d Mon Sep 17 00:00:00 2001 From: Vilmos Ioo Date: Sun, 29 Jan 2017 15:16:18 +0000 Subject: [PATCH 3/3] Updated argument type --- sinon/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sinon/index.d.ts b/sinon/index.d.ts index be0d3820bb..7c44ab9d7a 100644 --- a/sinon/index.d.ts +++ b/sinon/index.d.ts @@ -109,7 +109,7 @@ declare namespace Sinon { callsArgOnAsync(index: number, context: any): SinonStub; callsArgWithAsync(index: number, ...args: any[]): SinonStub; callsArgOnWithAsync(index: number, context: any, ...args: any[]): SinonStub; - callsFake(...args: any[]): SinonStub; + callsFake(func: (...args: any[]) => void): SinonStub; onCall(n: number): SinonStub; onFirstCall(): SinonStub; onSecondCall(): SinonStub;