• Replaces property on an object with another value.

    Type Parameters

    • T extends object
    • K extends string | number | symbol

    Parameters

    • obj: T
    • key: K
    • value: T[K]

    Returns ReplaceProperty<T[K]>

    For mocking functions, and 'get' or 'set' accessors, use jest.spyOn() instead.