/** @see [RecursivePartial](https://stackoverflow.com/a/51365037/2285470) */ export type RecursivePartial = { [P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial[] : T[P] extends object ? RecursivePartial : T[P]; }; export type Intersect = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never; export type KeyValuePair = { key: string; value: string; }; export type MergeTuple = [...A, ...B]; export type Constructor = new (...args: any) => T; /** @see[Exactify](https://github.com/microsoft/TypeScript/issues/12936#issuecomment-368244671) */ export type ExcludePropertiesOf = T & { [K in keyof X]: K extends keyof T ? X[K] : never; }; /** @see [Nested Omit](https://stackoverflow.com/a/78575949) */ export type NestedOmit = Path extends `${infer Head}.${infer Tail}` ? Head extends keyof Schema ? { [K in keyof Schema]: K extends Head ? NestedOmit : Schema[K]; } : Schema : Omit;