Skip to content

Commit d2b130d

Browse files
committed
Fix all AsymmetricMatcher interfaces
1 parent 0533153 commit d2b130d

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

types/jest-globals.d.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@ import {type TestingLibraryMatchers} from './matchers'
44
export {}
55
declare module '@jest/expect' {
66
export interface Matchers<R extends void | Promise<void>>
7-
extends TestingLibraryMatchers<typeof expect.stringContaining, R> {}
7+
extends TestingLibraryMatchers<
8+
ReturnType<typeof expect.stringContaining>,
9+
R
10+
> {}
811
}

types/jest.d.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ import {type TestingLibraryMatchers} from './matchers'
55
declare global {
66
namespace jest {
77
interface Matchers<R = void, T = {}>
8-
extends TestingLibraryMatchers<typeof expect.stringContaining, R> {}
8+
extends TestingLibraryMatchers<
9+
ReturnType<typeof expect.stringContaining>,
10+
R
11+
> {}
912
}
1013
}

types/vitest.d.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@ import {type TestingLibraryMatchers} from './matchers'
44
export {}
55
declare module '@vitest/expect' {
66
interface JestAssertion<T = any>
7-
extends TestingLibraryMatchers<typeof expect.stringContaining, T> {}
7+
extends TestingLibraryMatchers<
8+
ReturnType<typeof expect.stringContaining>,
9+
T
10+
> {}
811
}

0 commit comments

Comments
 (0)