unwrapOrForNullable
Return input as T
if the passed input is not null
.
Otherwise, return defaultValue.
- defaultValue must not be
Nullable<*>
. - If the defaultValue is
null
, throwTypeError
.
Return input as T
if the passed input is not null
.
Otherwise, return defaultValue.
Nullable<*>
.null
, throw TypeError
.