-
-
Notifications
You must be signed in to change notification settings - Fork 226
Open
Labels
Description
Is your feature request related to a problem? Please describe.
When using the below syntax, we get TS errors.
expect.extend(jestMatchers); Type 'CustomMatchers<any>' is not assignable to type '{ [x: string]: RawMatcherFn<MatcherState, unknown[]> | undefined; pass?: RawMatcherFn<MatcherState, [message: string]>; fail?: RawMatcherFn<MatcherState, [message: ...]>; ... 74 more ...; toBeValidUUID?: RawMatcherFn<...>; }'.
Types of property 'toChangeBy' are incompatible.
Type '(checker: () => number | bigint, by?: number | bigint | undefined) => any' is not assignable to type 'RawMatcherFn<MatcherState, [checker: () => number | bigint, by?: number | bigint | undefined]>'.
Types of parameters 'by' and 'checker' are incompatible.
Type '() => number | bigint' is not assignable to type 'number | bigint | undefined'.ts(2345)
Describe the solution you'd like
declare module 'vitest' {
interface Matchers<T = any> extends CustomMatchers<T> {}
}Additional context
See release https://vitest.dev/blog/vitest-3-2.html#the-new-multi-purpose-matchers-type