• 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[]

          • Optionalparent: T

          Returns U

    Returns U