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

26 lines
610 B
Markdown
Raw Normal View History

2020-03-29 14:10:40 +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; [getHead](./js-utils.gethead.md)
## getHead() function
Get the first element from the specified key within a map of lists.
2020-03-29 14:10:40 +00:00
<b>Signature:</b>
```typescript
export declare function getHead<TKey, TVal>(map: Map<TKey, ReadonlyArray<TVal>>, key: TKey): TVal;
2020-03-29 14:10:40 +00:00
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| map | Map&lt;TKey, ReadonlyArray&lt;TVal&gt;&gt; | |
| key | TKey | |
2020-03-29 14:10:40 +00:00
<b>Returns:</b>
TVal
2020-03-29 14:10:40 +00:00