2 lines
121 B
TypeScript
2 lines
121 B
TypeScript
|
type RequireAtLeastOne<T> = { [K in keyof T]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<keyof T, K>>> }[keyof T];
|