Skip to main content

Type Alias: RequireOnlyOne<T, Keys>

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

Type Parameters

T

Keys extends keyof T = keyof T