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

31 lines
572 B
Markdown
Raw Normal View History

2020-03-29 13:43:52 +00:00
<!-- 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