@acutmore/rxjs
Version:
Reactive Extensions for modern JavaScript
31 lines • 1.23 kB
JavaScript
// v4-backwards-compatibility
var __extends = (this && this.__extends) || (function () {
var 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 function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { Action } from './Action';
var ImmediateAction = /** @class */ (function (_super) {
__extends(ImmediateAction, _super);
function ImmediateAction(scheduler, work) {
var _this = _super.call(this, scheduler, work) || this;
_this.work = work;
return _this;
}
ImmediateAction.prototype.schedule = function (state, delay) {
if (delay === void 0) { delay = 0; }
if (delay !== 0) {
throw new Error('Only delays of 0 can be scheduled on the Rx.immediate scheduler');
}
this.work(state);
return this;
};
return ImmediateAction;
}(Action));
export { ImmediateAction };
//# sourceMappingURL=ImmediateAction.js.map