source: node_modules/es-toolkit/dist/compat/array/concat.d.ts

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 777 bytes
Line 
1/**
2 * Concatenates multiple arrays and values into a single array.
3 *
4 * @template T The type of elements in the array.
5 * @param {...(T | T[])} values - The values and/or arrays to concatenate.
6 * @returns {T[]} A new array containing all the input values.
7 *
8 * @example
9 * // Concatenate individual values
10 * concat(1, 2, 3);
11 * // returns [1, 2, 3]
12 *
13 * @example
14 * // Concatenate arrays of values
15 * concat([1, 2], [3, 4]);
16 * // returns [1, 2, 3, 4]
17 *
18 * @example
19 * // Concatenate a mix of individual values and arrays
20 * concat(1, [2, 3], 4);
21 * // returns [1, 2, 3, 4]
22 *
23 * @example
24 * // Concatenate nested arrays
25 * concat([1, [2, 3]], 4);
26 * // returns [1, [2, 3], 4]
27 */
28declare function concat<T>(...values: Array<T | readonly T[]>): T[];
29
30export { concat };
Note: See TracBrowser for help on using the repository browser.