// Generated by dts-bundle-generator v7.2.0 export type StubbedInstance = { [P in keyof T]: StubbedMember; }; /** * Replaces a type with a stub if it's a function. */ export type StubbedMember = T extends (...args: infer TArgs) => infer TReturnValue ? StubT : T; /** * * @param createStub - method for stub creation, for example: sinon.stub() * @returns a stub creator object with a single method: createStubbedInstance * * @example * ```ts * class MyClass { * constructor(input: number) { * throw new Error("Should not be called"); * } * func(input: number, text: string) { * console.log(text); * return input; * } * property: number = 3; * optionalProperty?: number; * get getter(): number { * return this.property; * } * set setter(value: number) { * throw new Error("Should not be called"); * } * } * * const sinonStubbedInstanceCreator = StubbedInstanceCreator( * () => sinon.stub() * ); * * const sinonMockMyClass = sinonStubbedInstanceCreator.createStubbedInstance(); * * const jestStubbedInstanceCreator = StubbedInstanceCreator( * () => jest.fn() * ); * * const jestMockMyClass = jestStubbedInstanceCreator.createStubbedInstance(); * ``` */ export declare const StubbedInstanceCreator: (createStub: (prop: string) => StubT) => { createStubbedInstance: (overrides?: Partial) => StubbedInstance & T; }; export {};