Skip to content

Commit

Permalink
chore: fix jest-mock spyOn argument inferring (#7878)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB authored Feb 13, 2019
1 parent 9ba62ad commit 3f19f67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/jest-mock/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ class ModuleMockerClass {
object: T,
methodName: M,
): T[M] extends (...args: any[]) => any
? SpyInstance<ReturnType<T[M]>, ArgsType<T[M]>>
? SpyInstance<ReturnType<T[M]>, Parameters<T[M]>>
: never;

spyOn<T extends {}, M extends NonFunctionPropertyNames<T>>(
Expand Down

0 comments on commit 3f19f67

Please sign in to comment.