Makes the keys in K required with non-nullish value types; all other keys keep their original optionality.
K
Source object type.
Keys to require (values become non-nullish).
type Input = { id?: string; name?: string; active?: boolean };type Output = SomeRequired<Input, "id">;// ^? { id: string; name?: string; active?: boolean } Copy
type Input = { id?: string; name?: string; active?: boolean };type Output = SomeRequired<Input, "id">;// ^? { id: string; name?: string; active?: boolean }
Makes the keys in
Krequired with non-nullish value types; all other keys keep their original optionality.