Skip to content

Commit

Permalink
fix: Align RawMatcherFn type definition with Jest (#6351)
Browse files Browse the repository at this point in the history
  • Loading branch information
wheresrhys authored Aug 19, 2024
1 parent 874a121 commit d09f00c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion packages/expect/src/jest-extend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ function JestExtendPlugin(
) {
const { state, isNot, obj } = getMatcherState(this, expect)

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

if (
Expand Down
2 changes: 1 addition & 1 deletion packages/expect/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export type AsyncExpectationResult = Promise<SyncExpectationResult>
export type ExpectationResult = SyncExpectationResult | AsyncExpectationResult

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

export type MatchersObject<T extends MatcherState = MatcherState> = Record<
Expand Down

0 comments on commit d09f00c

Please sign in to comment.