26 lines
610 B
Markdown
26 lines
610 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
|
|
[Home](./index.md) > [@apextoaster/js-utils](./js-utils.md) > [getHead](./js-utils.gethead.md)
|
|
|
|
## getHead() function
|
|
|
|
Get the first element from the specified key within a map of lists.
|
|
|
|
<b>Signature:</b>
|
|
|
|
```typescript
|
|
export declare function getHead<TKey, TVal>(map: Map<TKey, ReadonlyArray<TVal>>, key: TKey): TVal;
|
|
```
|
|
|
|
## Parameters
|
|
|
|
| Parameter | Type | Description |
|
|
| --- | --- | --- |
|
|
| map | Map<TKey, ReadonlyArray<TVal>> | |
|
|
| key | TKey | |
|
|
|
|
<b>Returns:</b>
|
|
|
|
TVal
|
|
|