"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.findFirstDescedantNode = findFirstDescedantNode;
function findFirstDescedantNode(doc, predicate) {
    let found = null;
    doc.descendants((node, pos, parent, index) => {
        if (found)
            return false;
        if (predicate(node))
            found = { node, pos, parent, index };
        return true;
    });
    return found;
}
//# sourceMappingURL=descedants.js.map
