Skip to content

MockImplementationParams<T, K, F>

Parameters for mockImplementation.

Import:

import type { MockImplementationParams } from '@mnaoumov/typescript-test-toolkit/mock-implementation';

Signature:

export interface MockImplementationParams<T extends object, K extends keyof FunctionPropertyMembers<T> & string, F extends GenericFunction = NonNullable<T[K]> extends GenericFunction ? NonNullable<T[K]> : GenericFunction>

Properties

PropertyTypeDescription
$objectTThe object whose method to spy on.
impl(this: T, originalImplementation: F, ...$arguments: Parameters<F>) => ReturnType<F>Replacement function receiving the original implementation and call args.
methodKThe method name.

Links to this page: