25 lines
675 B
Markdown
25 lines
675 B
Markdown
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||
|
|
||
|
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [getHeadOrDefault](./js-utils.getheadordefault.md)
|
||
|
|
||
|
## getHeadOrDefault() function
|
||
|
|
||
|
<b>Signature:</b>
|
||
|
|
||
|
```typescript
|
||
|
export declare function getHeadOrDefault<TKey, TVal>(map: Map<TKey, Array<Optional<TVal>>>, key: TKey, defaultValue: TVal): TVal;
|
||
|
```
|
||
|
|
||
|
## Parameters
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --- | --- | --- |
|
||
|
| map | <code>Map<TKey, Array<Optional<TVal>>></code> | |
|
||
|
| key | <code>TKey</code> | |
|
||
|
| defaultValue | <code>TVal</code> | |
|
||
|
|
||
|
<b>Returns:</b>
|
||
|
|
||
|
`TVal`
|
||
|
|