// overloaded function for using `mocked(`..`)` with any kind of function export function mocked(item: (...args: V) => T): jest.Mock; export function mocked(item: T): jest.Mock { if (!jest.isMockFunction(item)) { throw new Error('Argument provided to `mocked(`..`)` is not a Jest mock function'); } return item; }