source: trip-planner-front/node_modules/rxjs/_esm5/internal/scheduler/QueueAction.js@ 59329aa

Last change on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.4 KB
Line 
1/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */
2import * as tslib_1 from "tslib";
3import { AsyncAction } from './AsyncAction';
4var QueueAction = /*@__PURE__*/ (function (_super) {
5 tslib_1.__extends(QueueAction, _super);
6 function QueueAction(scheduler, work) {
7 var _this = _super.call(this, scheduler, work) || this;
8 _this.scheduler = scheduler;
9 _this.work = work;
10 return _this;
11 }
12 QueueAction.prototype.schedule = function (state, delay) {
13 if (delay === void 0) {
14 delay = 0;
15 }
16 if (delay > 0) {
17 return _super.prototype.schedule.call(this, state, delay);
18 }
19 this.delay = delay;
20 this.state = state;
21 this.scheduler.flush(this);
22 return this;
23 };
24 QueueAction.prototype.execute = function (state, delay) {
25 return (delay > 0 || this.closed) ?
26 _super.prototype.execute.call(this, state, delay) :
27 this._execute(state, delay);
28 };
29 QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {
30 if (delay === void 0) {
31 delay = 0;
32 }
33 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
34 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
35 }
36 return scheduler.flush(this);
37 };
38 return QueueAction;
39}(AsyncAction));
40export { QueueAction };
41//# sourceMappingURL=QueueAction.js.map
Note: See TracBrowser for help on using the repository browser.