I am in the process of developing a versatile type that can accept an interface, type literal, or a class.
The desired outcome is for the resulting type to retain the original properties as well as have the methods set to jest.Mock
type MockedType<T> = /* TODO */ Record<keyof T, jest.Mock>
interface Foobar {
foo: string
bar(): void
}
declare const foobar: MockedType<Foobar>
foobar.foo // string
foobar.bar // jest.Mock