Type alias AtLeastOne<T, U>

AtLeastOne<T, U>: Partial<T> & U[keyof U]

Requires at least one property to be defined.

Credit: https://stackoverflow.com/questions/48230773 /how-to-create-a-partial-like-that-requires-a-single-property-to-be-set/48244432#48244432

Type Parameters

  • T

  • U = { [ K in keyof T]: Pick<T, K> }

Generated using TypeDoc