From 633e318ba9a77a5cdc04fdb9246442cbe2eb77de Mon Sep 17 00:00:00 2001 From: Pavel Kabir Date: Mon, 5 Jun 2023 06:48:06 +0100 Subject: [PATCH] Change unknown to any in toHaveBeenCalledBefore and toHaveBeenCalledAfter (closes #552) --------- Co-authored-by: Keegan Witt --- types/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/index.d.ts b/types/index.d.ts index 52d1bd97..16626d35 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -146,7 +146,7 @@ interface CustomMatchers extends Record { * @param {Mock} mock * @param {boolean} [failIfNoSecondInvocation=true] */ - toHaveBeenCalledBefore(mock: jest.MockInstance, failIfNoSecondInvocation: boolean): R; + toHaveBeenCalledBefore(mock: jest.MockInstance, failIfNoSecondInvocation: boolean): R; /** * Use `.toHaveBeenCalledAfter` when checking if a `Mock` was called after another `Mock`. @@ -156,7 +156,7 @@ interface CustomMatchers extends Record { * @param {Mock} mock * @param {boolean} [failIfNoFirstInvocation=true] */ - toHaveBeenCalledAfter(mock: jest.MockInstance, failIfNoFirstInvocation: boolean): R; + toHaveBeenCalledAfter(mock: jest.MockInstance, failIfNoFirstInvocation: boolean): R; /** * Use `.toHaveBeenCalledOnce` to check if a `Mock` was called exactly one time. @@ -580,7 +580,7 @@ declare namespace jest { * @param {Mock} mock * @param {boolean} [failIfNoSecondInvocation=true] */ - toHaveBeenCalledBefore(mock: jest.MockInstance, failIfNoSecondInvocation?: boolean): R; + toHaveBeenCalledBefore(mock: jest.MockInstance, failIfNoSecondInvocation?: boolean): R; /** * Use `.toHaveBeenCalledAfter` when checking if a `Mock` was called after another `Mock`. @@ -590,7 +590,7 @@ declare namespace jest { * @param {Mock} mock * @param {boolean} [failIfNoFirstInvocation=true] */ - toHaveBeenCalledAfter(mock: jest.MockInstance, failIfNoFirstInvocation?: boolean): R; + toHaveBeenCalledAfter(mock: jest.MockInstance, failIfNoFirstInvocation?: boolean): R; /** * Use `.toHaveBeenCalledOnce` to check if a `Mock` was called exactly one time.