/** * Narrow down a Record to a plain object. */ export type NarrowPlainObject> = Exclude | Function | Map | Set>; /** * An object without excluded types. */ export type RemoveType = { [Key in keyof TObject as TObject[Key] extends TExclude ? never : Key]: TObject[Key]; }; /** * A strict plain object with a specific set of keys. */ export type StrictObject = TExpected & { [Key in keyof TObject]: Key extends keyof TExpected ? TExpected[Key] : never; };