UNPKG

ts-auto-mock

Version:

Typescript transformer to unlock automatic mock creation for interfaces and classes

23 lines (22 loc) 1 kB
type Method = (name: string, value: any) => () => any; type MethodWithDeferredValue = (name: string, value: () => any) => () => any; export declare class Provider { private _method; private _isUsingDeprecatedProvideMethod; private constructor(); private static _instance; static get instance(): Provider; /** * @deprecated ts-auto-mock will disable this functionality from version 2 because is not fully compatible with * call signatures. It will cause an maximum call stack exceeded error. * @see (https://github.com/Typescript-TDD/ts-auto-mock/blob/master/test/frameworkContext/recursive/recursive.test.deprecated.ts) * * Please use provideMethodWithDeferredValue instead * * @see [Extension](https://typescript-tdd.github.io/ts-auto-mock/extension) */ provideMethod(method: Method): void; provideMethodWithDeferredValue(method: MethodWithDeferredValue): void; getMethod(name: string, value: () => any): Method; } export {};