ts-type-forge
    Preparing search index...

    Type Alias PartiallyPartial<T, K>

    PartiallyPartial: MergeIntersection<Omit<T, K> & Partial<Pick<T, K>>>

    Creates a type where specified keys K of T are made optional. The resulting type is a merged intersection for better readability.

    Type Parameters

    • T

      The original type.

    • K extends keyof T

      The keys to make optional.

    A new type with keys K made optional.

    type Data = { a: number; b: string; c: boolean };
    type PartiallyPartialData = PartiallyPartial<Data, 'a' | 'b'>;
    // Result: { a?: number; b?: string; c: boolean }