Nullish value (either null or undefined).
null
undefined
This type is useful for cases where a value might be null or undefined, generally meant to be dealt with using the ?? operator.
??
const nullishUndefined: Nullish = undefined;const nullishNull: Nullish = null; Copy
const nullishUndefined: Nullish = undefined;const nullishNull: Nullish = null;
Nullish value (either
null
orundefined
).Remarks
This type is useful for cases where a value might be
null
orundefined
, generally meant to be dealt with using the??
operator.Example
See