Hex Core JS
    Preparing search index...

    Type Alias RequiredOnlyOne<T, Key>

    RequiredOnlyOne: Omit<T, Key> & {
        [K in Key]-?: Required<Pick<T, K>> & Partial<
            Record<Exclude<Key, K>, undefined>,
        >
    }[Key]

    Constructs a new type from T where only one of the specified keys (Key) can be supplied and is required.

    Type Parameters

    • T
    • Key extends keyof T = keyof T