"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Chainable_1 = require("../../chainable/Chainable");
class DateLimiter extends Chainable_1.ChainableFilter {
    constructor(until) {
        super();
        this.until = until;
    }
    me() {
        return this;
    }
    take(error, comparedTx) {
        if (error)
            throw error;
        if (comparedTx.timestamp.getTime() >= this.until.getTime()) {
            return this.give(undefined, comparedTx);
        }
        else {
            return false;
        }
    }
}
exports.DateLimiter = DateLimiter;
//# sourceMappingURL=DateLimiter.js.map