ixfx
    Preparing search index...

    Type Alias RequireOnlyOne<T, Keys>

    RequireOnlyOne: Pick<T, Exclude<keyof T, Keys>> & {
        [K in Keys]-?: Required<Pick<T, K>> & Partial<
            Record<Exclude<Keys, K>, undefined>,
        >
    }[Keys]

    Makes a type such that only one of the provided properties is required. RequireOnlyOne<someType, 'prop1'|'prop2'>

    Type Parameters

    • T
    • Keys extends keyof T = keyof T