There is an issue with the type definition of jest.fn() in the jest-mock package. The types T... and Y... are being flipped from arguments to return values!
exporttypeJestFuncFn= <T..., Y...>(implementation: ((Y...) ->T...)?) -> (MockFn, (T...) ->Y...)
-- should beexporttypeJestFuncFn= <T..., Y...>(implementation: ((T...) ->Y...)?) -> (MockFn, (T...) ->Y...)
There is an issue with the type definition of
jest.fn()in the jest-mock package. The typesT...andY...are being flipped from arguments to return values!