Makes the keys in K optional; all other keys keep their original optionality and value types.
K
Source object type.
Keys to make optional.
type Input = { id: string; name: string; active: boolean };type Output = SomeOptional<Input, "active">;// ^? { id: string; name: string; active?: boolean } Copy
type Input = { id: string; name: string; active: boolean };type Output = SomeOptional<Input, "active">;// ^? { id: string; name: string; active?: boolean }
Makes the keys in
Koptional; all other keys keep their original optionality and value types.