"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Chainable_1 = require("./Chainable");
class ChainableOnError extends Chainable_1.ChainableFilter {
    constructor(onErrorCallback) {
        super();
        this.onErrorCallback = onErrorCallback;
    }
    me() {
        return this;
    }
    take(error, item) {
        if (error)
            this.onErrorCallback(error);
        return this.give(error, item);
    }
}
//# sourceMappingURL=ChainableOnError.js.map