1 /** PURE_IMPORTS_START tslib,_Scheduler PURE_IMPORTS_END */
2 import * as tslib_1 from "tslib";
3 import { Scheduler } from '../Scheduler';
4 var AsyncScheduler = /*@__PURE__*/ (function (_super) {
5 tslib_1.__extends(AsyncScheduler, _super);
6 function AsyncScheduler(SchedulerAction, now) {
10 var _this = _super.call(this, SchedulerAction, function () {
11 if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) {
12 return AsyncScheduler.delegate.now();
20 _this.scheduled = undefined;
23 AsyncScheduler.prototype.schedule = function (work, delay, state) {
24 if (delay === void 0) {
27 if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {
28 return AsyncScheduler.delegate.schedule(work, delay, state);
31 return _super.prototype.schedule.call(this, work, delay, state);
34 AsyncScheduler.prototype.flush = function (action) {
35 var actions = this.actions;
43 if (error = action.execute(action.state, action.delay)) {
46 } while (action = actions.shift());
49 while (action = actions.shift()) {
55 return AsyncScheduler;
57 export { AsyncScheduler };
58 //# sourceMappingURL=AsyncScheduler.js.map