1
0
Fork 0
js-utils/docs/api/js-utils.mustexist.md

31 lines
572 B
Markdown

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [@apextoaster/js-utils](./js-utils.md) &gt; [mustExist](./js-utils.mustexist.md)
## mustExist() function
Assert that a variable is not nil and return the value.
<b>Signature:</b>
```typescript
export declare function mustExist<T>(val: Optional<T>): T;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| val | <code>Optional&lt;T&gt;</code> | |
<b>Returns:</b>
`T`
val
## Exceptions
NotFoundError