Skip to content

Commit 4751436

Browse files
authored
fix: revert expect.any return type (#8129)
1 parent 8aa2521 commit 4751436

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/expect/src/types.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ export interface ExpectStatic
108108
AsymmetricMatchersContaining {
109109
<T>(actual: T, message?: string): Assertion<T>
110110
extend: (expects: MatchersObject) => void
111-
anything: () => AsymmetricMatcher<unknown>
112-
any: (constructor: unknown) => AsymmetricMatcher<unknown>
111+
anything: () => any
112+
any: (constructor: unknown) => any
113113
getState: () => MatcherState
114114
setState: (state: Partial<MatcherState>) => void
115115
not: AsymmetricMatchersContaining
@@ -202,15 +202,15 @@ export interface JestAssertion<T = any> extends jest.Matchers<void, T>, CustomMa
202202
* @example
203203
* expect(user).toEqual({ name: 'Alice', age: 30 });
204204
*/
205-
toEqual: <E>(expected: DeeplyAllowMatchers<E>) => void
205+
toEqual: <E>(expected: E) => void
206206

207207
/**
208208
* Use to test that objects have the same types as well as structure.
209209
*
210210
* @example
211211
* expect(user).toStrictEqual({ name: 'Alice', age: 30 });
212212
*/
213-
toStrictEqual: <E>(expected: DeeplyAllowMatchers<E>) => void
213+
toStrictEqual: <E>(expected: E) => void
214214

215215
/**
216216
* Checks that a value is what you expect. It calls `Object.is` to compare values.
@@ -240,7 +240,7 @@ export interface JestAssertion<T = any> extends jest.Matchers<void, T>, CustomMa
240240
* address: { city: 'Wonderland' }
241241
* });
242242
*/
243-
toMatchObject: <E extends object | any[]>(expected: DeeplyAllowMatchers<E>) => void
243+
toMatchObject: <E extends object | any[]>(expected: E) => void
244244

245245
/**
246246
* Used when you want to check that an item is in a list.

0 commit comments

Comments
 (0)