type PlainType = Record type ExtractRecordValue = T extends Record ? V : never type ExtractArrayValue = T extends Array ? V : never type Without = { [P in Exclude]?: never } type OnlyOne = T | U extends object ? (Without & U) | (Without & T) : T | U type Mutable = { -readonly [K in keyof T]: T[K] } type AssignKeys = { [K in keyof U]: K extends keyof Y ? Y[K] : U[K] } & Y type Optional = { [P in K]?: U[K] } & Omit type PartRequire = { [P in K]-?: U[K] } & Omit