"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.watchGraphMetadataEvent = watchGraphMetadataEvent;
function watchGraphMetadataEvent(event, graph, callback) {
    const listener = (data, path) => {
        callback({
            type: 'graph',
            event,
            data: {
                data,
                path,
            },
        });
    };
    graph.prependListener(event, listener);
    return () => {
        graph.removeListener(event, listener);
    };
}
//# sourceMappingURL=watchGraphMetadataEvent.js.map