import type { ChartDatapoint } from '../../../core/types/chart-data.js'; /** * Returns `[root, ...descendants]` in BFS order (root first, then direct * children, then grandchildren, …) using a pre-built `childrenByParentId` * map. Callers should build the map once via `buildFlameIndex` and reuse it * across renders — this walk is `O(subtree)`, never `O(data)`. * * A `visited` set guards against cyclic data (a corrupt dataset where a * parent id points at one of its own descendants) so the walk terminates. * The queue is drained with a head cursor instead of `Array.prototype.shift()` * — `.shift()` reindexes the queue and would degrade the walk to `O(n²)`. * @internal */ export declare function collectSubtree(root: TData, rootId: unknown, childrenByParentId: ReadonlyMap, idAccessor: string): TData[]; //# sourceMappingURL=collect-subtree.d.ts.map