source: trip-planner-front/node_modules/array-flatten/array-flatten.d.ts@ 8d391a1

Last change on this file since 8d391a1 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 526 bytes
Line 
1declare function flatten <T> (array: flatten.NestedArray<T>): T[];
2
3declare namespace flatten {
4 export interface NestedArray <T> extends ReadonlyArray<T | NestedArray<T>> {}
5
6 export interface NestedList <T> {
7 [index: number]: T | NestedList<T>;
8 length: number;
9 }
10
11 export function from <T> (array: NestedList<T>): T[];
12 export function depth <T> (array: NestedArray<T>, depth: number): NestedArray<T>;
13 export function depthFrom <T> (array: NestedList<T>, depth: number): NestedArray<T>;
14}
15
16export = flatten;
Note: See TracBrowser for help on using the repository browser.