export type Nullish = null | undefined; export type Nullable = T | null; export type IsNullable = [null] extends [T] ? true : false; export type Optional = T | undefined; /** Extract keys K from T and make them required */ export type PickRequired = Required>; /** Extract keys K from T and make them partial */ export type PickPartial = Partial>; /** Omit keys K from T and make the rest required */ export type OmitRequired = Required>; /** Omit keys K from T and make the rest partial */ export type OmitPartial = Partial>; /** Make keys K required and the rest partial in T */ export type PickAndPartial = PickRequired & OmitPartial; /** Make keys K required in T while keeping the rest unchanged */ export type RequiredBy = PickRequired & T; /** Make keys K partial in T while keeping the rest unchanged */ export type PartialBy = PickPartial & Omit; export type Roll = { [K in keyof T]: T[K] }; export type Expand = T extends infer O ? { [K in keyof O]: O[K] } : never; export type ExpandRecursively = T extends object ? T extends infer O ? { [K in keyof O]: ExpandRecursively } : never : T; export type WithKey = T & { key: string }; export type ElementOf = T[number]; export type Params> = Record;