Type alias RequireAtLeastOne<T, Keys>

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

Type Parameters

  • T
  • Keys extends keyof T = keyof T