assertNotNull()function

assertNotNull(value: Nullable<T>, caller: AnyCaller = assertNotNull): asserts value is T
ParamType
valueNullable<T>
The value to assert. required
callerAnyCaller
Function used to attribute a thrown error to the calling site. Defaults to assertNotNull
Return
asserts value is T
Nothing; narrows value to T.
Throws
unknown
RequiredError if value is null.

Assert that a value is not null.