"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.addListener = addListener;
exports.addListeners = addListeners;
const callAll_1 = require("../util/call/callAll");
function addListener(listenable, listener) {
    return listener(listenable);
}
function addListeners(listenable, listeners) {
    const allUnlisten = [];
    for (const listener of listeners) {
        const unlisten = addListener(listenable, listener);
        allUnlisten.push(unlisten);
    }
    const unlisten = (0, callAll_1.callAll)(allUnlisten);
    return unlisten;
}
//# sourceMappingURL=addListener.js.map