dyna-record
    Preparing search index...

    Type Alias AtLeastOne<T>

    AtLeastOne: { [K in keyof T]-?: Required<Pick<T, K>> & Partial<Omit<T, K>> }[keyof T]

    Requires at least one of an object's properties to be present, while leaving every property optional individually.

    Distributes over the keys, so the result is the union of "this one is required, the rest are optional" — which is what lets several be supplied together while rejecting the empty object.

    Type Parameters

    • T