Created
December 19, 2021 07:03
-
-
Save insyri/ef885975990d2ab71524f097283e205f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://docs.microsoft.com/en-us/javascript/api/@azure/keyvault-certificates/requireatleastone | |
export type RequireAtLeastOne<T> = { | |
[K in keyof T]-?: Required<Pick<T, K>> & | |
Partial<Pick<T, Exclude<keyof T, K>>>; | |
}[keyof T]; | |
export type ExampleOne = RequireAtLeastOne<{ | |
optionOne: string; | |
optionTwo: string; | |
}> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment