UNPKG

363 BTypeScriptView Raw
1/**
2 * @name arrayFlatten
3 * @summary Merge T[][] into T[]
4 * @description
5 * Returns a new array with all arrays merged into one
6 * @example
7 * <BR>
8 *
9 * ```javascript
10 * import { arrayFlatten } from '@polkadot/util';
11 *
12 * arrayFlatten([[1, 2], [3, 4], [5]]); // [1, 2, 3, 4, 5]
13 * ```
14 */
15export declare function arrayFlatten<T>(arrays: readonly T[][]): T[];