|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
572 bytes
|
| Rev | Line | |
|---|
| [a762898] | 1 | import { ListOfRecursiveArraysOrValues } from '../_internal/ListOfRecursiveArraysOrValues.js';
|
|---|
| 2 |
|
|---|
| 3 | /**
|
|---|
| 4 | * Recursively flattens array.
|
|---|
| 5 | *
|
|---|
| 6 | * @template T
|
|---|
| 7 | * @param {ArrayLike<T> | null | undefined} array - The array to flatten.
|
|---|
| 8 | * @returns {Array<ExtractNestedArrayType<T>>} Returns the new flattened array.
|
|---|
| 9 | *
|
|---|
| 10 | * @example
|
|---|
| 11 | * flattenDeep([1, [2, [3, [4]], 5]]);
|
|---|
| 12 | * // => [1, 2, 3, 4, 5]
|
|---|
| 13 | */
|
|---|
| 14 | declare function flattenDeep<T>(value: ListOfRecursiveArraysOrValues<T> | null | undefined): Array<T extends string ? T : T extends ArrayLike<any> ? never : T>;
|
|---|
| 15 |
|
|---|
| 16 | export { flattenDeep };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.