import { MatchersOrLiterals } from './Matchers'; import { DeepPartial } from 'ts-essentials'; import { jest } from '@jest/globals'; import { FunctionLike } from 'jest-mock'; 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: [...MatchersOrLiterals>]) => jest.Mock; } export type _MockProxy = { [K in keyof T]: T[K] extends FunctionLike ? T[K] & CalledWithMock : T[K]; }; export type MockProxy = _MockProxy & T; export type _DeepMockProxy = { [K in keyof T]: T[K] extends FunctionLike ? T[K] & CalledWithMock : T[K] & _DeepMockProxy; }; export type DeepMockProxy = _DeepMockProxy & T; export type _DeepMockProxyWithFuncPropSupport = { [K in keyof T]: T[K] extends FunctionLike ? 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: () => CalledWithMock & T; export declare const stub: () => T; export default mock;