26 lines
648 B
Markdown
26 lines
648 B
Markdown
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||
|
|
||
|
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [mustFind](./js-utils.mustfind.md)
|
||
|
|
||
|
## mustFind() function
|
||
|
|
||
|
Find a value matching the given predicate or throw.
|
||
|
|
||
|
<b>Signature:</b>
|
||
|
|
||
|
```typescript
|
||
|
export declare function mustFind<TVal>(list: Array<Optional<TVal>>, predicate: PredicateC1<TVal>): TVal;
|
||
|
```
|
||
|
|
||
|
## Parameters
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| list | <code>Array<Optional<TVal>></code> | |
|
||
|
| predicate | <code>PredicateC1<TVal></code> | |
|
||
|
|
||
|
<b>Returns:</b>
|
||
|
|
||
|
`TVal`
|
||
|
|