UNPKG

@coralogix/browser

Version:

Official Coralogix SDK for browsers

11 lines (10 loc) 487 B
/** * Ensures a given value is converted into an array of elements. * * @template T - The type of the input value and the elements in the resulting array. * * @param value - The input value, which can be a single instance of type `T`, an array of instances of type `T`, or a Set of instances of type `T`. * * @returns An array of elements of type `T`. If the input is `null` or `undefined`, returns an empty array. */ export declare function coerceArray<T>(value: T | T[]): T[];