Type Alias MockedObject<B, O>

MockedObject<B, O>: O extends any[]
    ? O
    : B extends {
            [k: PropertyKey]: any;
        }
        ? O extends Function
            ? O
            : O extends {
                    [k: string]: any;
                }
                ? {
                    [k in keyof B]: k extends keyof O
                        ? MockedObject<B[k], O[k]>
                        : B[k]
                }
                : O
        : O

Utility type, overrides the properties in B with the properties in O, deeply nested.

Type Parameters

  • B
  • O