- walkTree<T, U>(tree, callback): U
Type Parameters
- T extends {
children?: T[];
} - U = void
Parameters
- tree: T
- callback: ((item: T, next: (() => undefined | U[]), parent?: T) => U)
- (item, next, parent?): U
Parameters
- item: T
- next: (() => undefined | U[])
- (): undefined | U[]
Returns undefined | U[]
Optional
parent: T
Returns U
Returns U