"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var TaskCtrl = /** @class */ (function () {
    function TaskCtrl() {
        this.curId = 0;
        this.running = [];
    }
    TaskCtrl.prototype.add = function () {
        var id = this.curId + 1;
        this.running.push(id);
        this.curId = id;
        return id;
    };
    TaskCtrl.prototype.cancel = function (id) {
        this.running.splice(this.running.indexOf(id), 1);
    };
    TaskCtrl.prototype.isActive = function (id) {
        return this.running.indexOf(id) > -1;
    };
    return TaskCtrl;
}());
exports.default = TaskCtrl;
//# sourceMappingURL=task-ctrl.js.map