/** * Take an interface as parameter and return all children types as union types; */ export type UnionOfProperties = { [Key in keyof Type]: Key extends any ? Type[Key] : never; }[keyof Type]; /** * Recursively remove all nullable and/or undefined types from object */ export type DeepNonNullable = { [K in keyof T]-?: DeepNonNullable; }; /** * Recursively set all properties from object nullbable */ export type DeepNullable = { [K in keyof T]?: DeepNonNullable; }; /** * Remove specific property from a type object or interface */ export type SetOptionalPropertyFrom = Omit & Partial>;