export type RequireAtLeastOne = Pick> & { [K in Keys]-?: Required> & Partial>>; }[Keys]; export type RequireOnlyOne = Pick> & { [K in Keys]-?: Required> & Partial, undefined>>; }[Keys]; export type PartialRecord = { [C in K]?: T; }; export type ArrayElement = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;