@nevware21/ts-utils
    Preparing search index...

    Type Alias DeepPartial<T>

    DeepPartial: T extends Function
        ? T
        : T extends ReadonlyArray<infer U>
            ? ReadonlyArray<DeepPartial<U>>
            : T extends object ? { [P in keyof T]?: DeepPartial<T[P]> } : T

    Represents a recursive partial type where all nested properties are optional.

    Type Parameters

    • T

      The type to transform.

    0.14.0

    interface User {
    name: string;
    address: {
    street: string;
    city: string;
    };
    }

    // All nested properties become optional
    function updateUser(id: number, patch: DeepPartial<User>) { }

    updateUser(1, { address: { city: "Seattle" } }); // OK — street is not required