-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
jest.fn's implementation argument is no longer optional #32863
Comments
What is the issue ? Do you have an example ? current implementation is : function fn(): Mock;
function fn<T, Y extends any[]>(implementation: (...args: Y) => T): Mock<T, Y>; |
type PropOf = T[keyof T] (This already presumes the PR I just provided) Before I either had the choice not being able to get proper typing at all or pass jest.fn(undefined as any) into jest.fn |
Let me give you the full source code - otherwise it will be hard to understand what we're up to... We have a small utility function that allows us to mock any typescript interface like this:
|
Ok I understand. Thanks. I'll review the PR. |
If you know how to fix the issue, make a pull request instead.
@types/jest
package and had problems.This was introduced by PR #31094 / Commit 3b921ef
The text was updated successfully, but these errors were encountered: