RequireAtLeastOne<T> Type alias

Defines a type wherein at least one of the properties of T is required to exist. In the following example, paying for a coffee requires a customer to have either a credit card, some cash, or both in their wallet.

 interface Wallet {
   cash?: number;
   card?: CreditCard;
 }

 function payForCoffee(wallet: RequireAtLeastOne<Wallet>) { ... }

Source: @azure/keyvault-certificates.

RequireAtLeastOne = undefined

Defined in

Last Updated: 20 April, 2024