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

665 B

Home > @apextoaster/js-utils > toArray

toArray() function

Copy an existing readonly array-like or convert a single value to a readonly array.

Signature:

export declare function toArray<TVal>(val: Maybe<TVal | ReadonlyArray<TVal>>): ReadonlyArray<TVal>;

Parameters

Parameter Type Description
val Maybe<TVal | ReadonlyArray<TVal>>

Returns:

ReadonlyArray<TVal>