26 lines
654 B
Markdown
26 lines
654 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 | Array<[Optional](./js-utils.optional.md)<!-- --><TVal>> | |
|
|
| predicate | PredicateC1<TVal> | |
|
|
|
|
<b>Returns:</b>
|
|
|
|
TVal
|
|
|