"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.traverseTree = traverseTree;
function traverseTree(root, parent, callback, path = []) {
    callback(root, parent, path);
    root.children.forEach((child, index) => traverseTree(child, root, callback, [...path, index]));
}
function _printTree(tree) {
    traverseTree(tree, null, (node, parent, path) => 
    // eslint-disable-next-line no-console
    console.log(path, parent, node.value));
}
//# sourceMappingURL=tree.js.map