source: trip-planner-front/node_modules/rxjs/internal/scheduler/AsapAction.js@ 188ee53

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

initial commit

  • Property mode set to 100644
File size: 2.0 KB
Line 
1"use strict";
2var __extends = (this && this.__extends) || (function () {
3 var extendStatics = function (d, b) {
4 extendStatics = Object.setPrototypeOf ||
5 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7 return extendStatics(d, b);
8 }
9 return function (d, b) {
10 extendStatics(d, b);
11 function __() { this.constructor = d; }
12 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13 };
14})();
15Object.defineProperty(exports, "__esModule", { value: true });
16var Immediate_1 = require("../util/Immediate");
17var AsyncAction_1 = require("./AsyncAction");
18var AsapAction = (function (_super) {
19 __extends(AsapAction, _super);
20 function AsapAction(scheduler, work) {
21 var _this = _super.call(this, scheduler, work) || this;
22 _this.scheduler = scheduler;
23 _this.work = work;
24 return _this;
25 }
26 AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {
27 if (delay === void 0) { delay = 0; }
28 if (delay !== null && delay > 0) {
29 return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
30 }
31 scheduler.actions.push(this);
32 return scheduler.scheduled || (scheduler.scheduled = Immediate_1.Immediate.setImmediate(scheduler.flush.bind(scheduler, null)));
33 };
34 AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
35 if (delay === void 0) { delay = 0; }
36 if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
37 return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
38 }
39 if (scheduler.actions.length === 0) {
40 Immediate_1.Immediate.clearImmediate(id);
41 scheduler.scheduled = undefined;
42 }
43 return undefined;
44 };
45 return AsapAction;
46}(AsyncAction_1.AsyncAction));
47exports.AsapAction = AsapAction;
48//# sourceMappingURL=AsapAction.js.map
Note: See TracBrowser for help on using the repository browser.