- Preparing search index...
- The search index is not available
lightdash
Function requireNonNilElseThrow
- requireNonNilElseThrow<T>(value: undefined | null | T, errorSupplier: (() => Error)): T
-
Parameters
-
value: undefined | null | T
-
errorSupplier: (() => Error)
Returns T
Throws an exception if the value is nil, returns the value otherwise.
Since
13.0.0
Returns
The value provided with guarantee to be non-nil.
Throws
Error if value is nil.
Example