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

25 lines
665 B
Markdown

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [@apextoaster/js-utils](./js-utils.md) &gt; [toArray](./js-utils.toarray_1.md)
## toArray() function
Copy an existing readonly array-like or convert a single value to a readonly array.
<b>Signature:</b>
```typescript
export declare function toArray<TVal>(val: Maybe<TVal | ReadonlyArray<TVal>>): ReadonlyArray<TVal>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| val | [Maybe](./js-utils.maybe.md)<!-- -->&lt;TVal \| ReadonlyArray&lt;TVal&gt;&gt; | |
<b>Returns:</b>
ReadonlyArray&lt;TVal&gt;