Skip to content

Commit d09f00c

Browse files
authoredAug 19, 2024··
fix: Align RawMatcherFn type definition with Jest (#6351)
1 parent 874a121 commit d09f00c

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed
 

‎packages/expect/src/jest-extend.ts

-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ function JestExtendPlugin(
7575
) {
7676
const { state, isNot, obj } = getMatcherState(this, expect)
7777

78-
// @ts-expect-error args wanting tuple
7978
const result = expectAssertion.call(state, obj, ...args)
8079

8180
if (

‎packages/expect/src/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export type AsyncExpectationResult = Promise<SyncExpectationResult>
8585
export type ExpectationResult = SyncExpectationResult | AsyncExpectationResult
8686

8787
export interface RawMatcherFn<T extends MatcherState = MatcherState> {
88-
(this: T, received: any, expected: any, options?: any): ExpectationResult
88+
(this: T, received: any, ...expected: Array<any>): ExpectationResult
8989
}
9090

9191
export type MatchersObject<T extends MatcherState = MatcherState> = Record<

0 commit comments

Comments
 (0)
Please sign in to comment.