Skip to content

Suggestion for more accurate types for nested objects #884

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Suggestion for more accurate types
  • Loading branch information
NickBolles authored Dec 16, 2024
commit f8d24a21adc13914f9a2fb48fe12f3b76e7e9382
2 changes: 1 addition & 1 deletion packages/testing/ts-jest/src/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export type DeepMocked<T> = {
[K in keyof T]: Required<T>[K] extends (...args: any[]) => infer U
? jest.MockInstance<ReturnType<Required<T>[K]>, jest.ArgsType<T[K]>> &
((...args: jest.ArgsType<T[K]>) => DeepMocked<U>)
: T[K];
: DeepMocked<T[K]>;
} & T;

const jestFnProps = new Set([
Expand Down