Preview environment

function normalizeArray

export declare function normalizeArray<ItemType>(arr: RestOrArray<ItemType>): ItemType[];

Normalizes data that is a rest parameter or an array into an array with a depth of 1.

Type Parameters

ItemType

The data that must satisfy RestOrArray.

Parameters

arr: RestOrArray<ItemType>
The (possibly variadic) data to normalize