Extracts keys from a record R that are explicitly marked as optional using the ? modifier.
It works by creating a mapped type where all values are never and then using PickUndefined
to find keys where undefined is assignable (which is true only for optional properties in this context).
Extracts keys from a record
Rthat are explicitly marked as optional using the?modifier. It works by creating a mapped type where all values areneverand then usingPickUndefinedto find keys whereundefinedis assignable (which is true only for optional properties in this context).