///
import { MatchersOrLiterals } from './Matchers';
import { DeepPartial } from 'ts-essentials';
type ProxiedProperty = string | number | symbol;
export interface GlobalConfig {
ignoreProps?: ProxiedProperty[];
}
export declare const JestMockExtended: {
DEFAULT_CONFIG: GlobalConfig;
configure: (config: GlobalConfig) => void;
resetConfig: () => void;
};
export interface CalledWithMock extends jest.Mock {
calledWith: (...args: Y | MatchersOrLiterals) => jest.Mock;
}
export type _MockProxy = {
[K in keyof T]: T[K] extends (...args: infer A) => infer B ? T[K] & CalledWithMock : T[K];
};
export type MockProxy = _MockProxy & T;
export type _DeepMockProxy = {
[K in keyof T]: T[K] extends (...args: infer A) => infer B ? T[K] & CalledWithMock : T[K] & _DeepMockProxy;
};
export type DeepMockProxy = _DeepMockProxy & T;
export type _DeepMockProxyWithFuncPropSupport = {
[K in keyof T]: T[K] extends (...args: infer A) => infer B ? CalledWithMock & DeepMockProxy : DeepMockProxy;
};
export type DeepMockProxyWithFuncPropSupport = _DeepMockProxyWithFuncPropSupport & T;
export interface MockOpts {
deep?: boolean;
fallbackMockImplementation?: (...args: any[]) => any;
}
export declare const mockClear: (mock: MockProxy) => any;
export declare const mockReset: (mock: MockProxy) => any;
export declare function mockDeep(opts: {
funcPropSupport?: true;
fallbackMockImplementation?: MockOpts['fallbackMockImplementation'];
}, mockImplementation?: DeepPartial): DeepMockProxyWithFuncPropSupport;
export declare function mockDeep(mockImplementation?: DeepPartial): DeepMockProxy;
declare const mock: & T = _MockProxy & T>(mockImplementation?: DeepPartial, opts?: MockOpts) => MockedReturn;
export declare const mockFn: any ? AReal : any[], R = T extends (...args: any) => infer RReal ? RReal : any>() => CalledWithMock & T;
export declare const stub: () => T;
export default mock;