UNPKG

@chix/flow

Version:
47 lines 1.7 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var node_1 = require("../events/node"); var util_1 = require("../util"); var event_1 = require("./event"); function $Status(Base) { return (function (_super) { __extends(Status$, _super); function Status$() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.status = 'unknown'; return _this; } Status$.prototype.setStatus = function (status) { this.status = status; this.event(node_1.NodeEvents.STATUS_UPDATE, { node: this.export(), status: this.status, }); }; Status$.prototype.getStatus = function () { return this.status; }; return Status$; }(Base)); } exports.$Status = $Status; (function ($Status) { function create(Base) { return util_1.mixin($Status, event_1.$Event.create)(Base); } $Status.create = create; })($Status = exports.$Status || (exports.$Status = {})); //# sourceMappingURL=status.js.map