source: trip-planner-front/node_modules/rxjs/_esm5/internal/scheduler/AsapAction.js

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

initial commit

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