UNPKG

@acutmore/rxjs

Version:

Reactive Extensions for modern JavaScript

21 lines 739 B
// v4-backwards-compatibility 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