UNPKG

ts-auto-mock

Version:

Typescript transformer to unlock automatic mock creation for interfaces and classes

7 lines (6 loc) 408 B
import { Extension } from '../extension'; import { Method } from './method'; type FunctionReturn<TR> = () => TR; export declare function method<TFunctionReturn, TMock>(target: keyof TMock): Extension<TMock, Method<TFunctionReturn>>; export declare function method<TFunctionReturn, TMock>(cb: (mock: TMock) => FunctionReturn<TFunctionReturn> | Function): Extension<TMock, Method<TFunctionReturn>>; export {};