export type LiteralUnion = LiteralType | (BaseType & Record); export type OmitIndexSignature = { [K in keyof T as Record extends Record ? never : K]: T[K]; }; export type UnionToIntersection = (T extends unknown ? (value: T) => void : never) extends (value: infer Intersection) => void ? Intersection & T : never;