Optional value.
Extends a type with the empty value undefined alone, matching the absence reported by omitted properties and missing arguments: null remains a value in its own right, accepted only where T already admits it.
undefined
null
T
The type to extend with undefined
Optional value.
Extends a type with the empty value
undefinedalone, matching the absence reported by omitted properties and missing arguments:nullremains a value in its own right, accepted only whereTalready admits it.