nullishOr()
nullishOr<
A>(a): <B>(b) =>B|NonNullable<A>
Nullish Coalescing (a ?? b).
Type Parameters
A
A
The type of the first input value.
Parameters
a
A
The possible null value.
Returns
<
B>(b):B|NonNullable<A>
Type Parameters
B
B
Parameters
b
B
Returns
B | NonNullable<A>
Remark
pure function
Example
nullishOr(null)(4);
// 4