RequireAtLeastOne<T> Type
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.
Defined in
- core/bentley/src/UtilityTypes.ts Line 148
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.