PiDraw API
    Preparing search index...

    Type Alias Exclusive<T>

    Exclusive: {
        [K in keyof T]: Pick<T, K> & Partial<Record<Exclude<keyof T, K>, never>>
    }[keyof T]

    One member per key of T: it has that key, and forbids every other key (?: never). Where a plain union would accept an object that mixes the keys of several members, this one is refused by the compiler. For configurations that hold exactly one constraint among several.

    Type Parameters

    • T