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