/** Generic record type. */ export type AnyObject = Record; /** Excludes arrays, functions, Map, and Set from a record type. */ export type NarrowPlainObject> = Exclude< T, // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type Array | Function | Map | Set >; /** Makes all properties optional, with one level of depth for nested objects. */ export type PartialDeep = { [K in keyof T]?: T[K] extends object ? Partial : T[K]; }; /** Generic record type with unknown values. */ export type PlainObject = Record; /** Makes specific keys required while keeping others unchanged. */ export type SetRequired = Omit & Required>; /** Flattens intersection types for better IDE display. */ export type Simplify = { [K in keyof T]: T[K] } & {}; /** Extracts a union of all values from an object type. */ export type ValueOf = T[keyof T];