"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const typescript_1 = require("typescript");
function traverseNode(f, seed, sourceFile) {
    let acc = seed;
    visitChildren(sourceFile);
    return acc;
    function visitChildren(node) {
        if (node.kind !== typescript_1.SyntaxKind.SourceFile) {
            acc = f(acc, node);
        }
        typescript_1.forEachChild(node, visitChildren);
    }
}
exports.traverseNode = traverseNode;
//# sourceMappingURL=traverseNode.js.map