Every new change

This commit is contained in:
Luca Schwan
2020-03-25 11:05:34 +01:00
parent ff8491e75f
commit b4d041c5de
7164 changed files with 499221 additions and 135 deletions

31
node_modules/rxjs/internal/scheduler/Action.d.ts generated vendored Normal file
View File

@ -0,0 +1,31 @@
import { Scheduler } from '../Scheduler';
import { Subscription } from '../Subscription';
import { SchedulerAction } from '../types';
/**
* A unit of work to be executed in a `scheduler`. An action is typically
* created from within a {@link SchedulerLike} and an RxJS user does not need to concern
* themselves about creating and manipulating an Action.
*
* ```ts
* class Action<T> extends Subscription {
* new (scheduler: Scheduler, work: (state?: T) => void);
* schedule(state?: T, delay: number = 0): Subscription;
* }
* ```
*
* @class Action<T>
*/
export declare class Action<T> extends Subscription {
constructor(scheduler: Scheduler, work: (this: SchedulerAction<T>, state?: T) => void);
/**
* Schedules this action on its parent {@link SchedulerLike} for execution. May be passed
* some context object, `state`. May happen at some point in the future,
* according to the `delay` parameter, if specified.
* @param {T} [state] Some contextual data that the `work` function uses when
* called by the Scheduler.
* @param {number} [delay] Time to wait before executing the work, where the
* time unit is implicit and defined by the Scheduler.
* @return {void}
*/
schedule(state?: T, delay?: number): Subscription;
}

29
node_modules/rxjs/internal/scheduler/Action.js generated vendored Normal file
View File

@ -0,0 +1,29 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Subscription_1 = require("../Subscription");
var Action = (function (_super) {
__extends(Action, _super);
function Action(scheduler, work) {
return _super.call(this) || this;
}
Action.prototype.schedule = function (state, delay) {
if (delay === void 0) { delay = 0; }
return this;
};
return Action;
}(Subscription_1.Subscription));
exports.Action = Action;
//# sourceMappingURL=Action.js.map

1
node_modules/rxjs/internal/scheduler/Action.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"Action.js","sources":["../../src/internal/scheduler/Action.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,gDAA+C;AAiB/C;IAA+B,0BAAY;IACzC,gBAAY,SAAoB,EAAE,IAAmD;eACnF,iBAAO;IACT,CAAC;IAWM,yBAAQ,GAAf,UAAgB,KAAS,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;IACH,aAAC;AAAD,CAAC,AAjBD,CAA+B,2BAAY,GAiB1C;AAjBY,wBAAM"}

View File

@ -0,0 +1,15 @@
import { AsyncAction } from './AsyncAction';
import { AnimationFrameScheduler } from './AnimationFrameScheduler';
import { SchedulerAction } from '../types';
/**
* We need this JSDoc comment for affecting ESDoc.
* @ignore
* @extends {Ignored}
*/
export declare class AnimationFrameAction<T> extends AsyncAction<T> {
protected scheduler: AnimationFrameScheduler;
protected work: (this: SchedulerAction<T>, state?: T) => void;
constructor(scheduler: AnimationFrameScheduler, work: (this: SchedulerAction<T>, state?: T) => void);
protected requestAsyncId(scheduler: AnimationFrameScheduler, id?: any, delay?: number): any;
protected recycleAsyncId(scheduler: AnimationFrameScheduler, id?: any, delay?: number): any;
}

View File

@ -0,0 +1,47 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var AsyncAction_1 = require("./AsyncAction");
var AnimationFrameAction = (function (_super) {
__extends(AnimationFrameAction, _super);
function AnimationFrameAction(scheduler, work) {
var _this = _super.call(this, scheduler, work) || this;
_this.scheduler = scheduler;
_this.work = work;
return _this;
}
AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
if (delay !== null && delay > 0) {
return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
}
scheduler.actions.push(this);
return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); }));
};
AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
}
if (scheduler.actions.length === 0) {
cancelAnimationFrame(id);
scheduler.scheduled = undefined;
}
return undefined;
};
return AnimationFrameAction;
}(AsyncAction_1.AsyncAction));
exports.AnimationFrameAction = AnimationFrameAction;
//# sourceMappingURL=AnimationFrameAction.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"AnimationFrameAction.js","sources":["../../src/internal/scheduler/AnimationFrameAction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAA4C;AAS5C;IAA6C,wCAAc;IAEzD,8BAAsB,SAAkC,EAClC,IAAmD;QADzE,YAEE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAHqB,eAAS,GAAT,SAAS,CAAyB;QAClC,UAAI,GAAJ,IAAI,CAA+C;;IAEzE,CAAC;IAES,6CAAc,GAAxB,UAAyB,SAAkC,EAAE,EAAQ,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAEtF,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC,EAAE;YAC/B,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAED,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAI7B,OAAO,SAAS,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,qBAAqB,CACxE,cAAM,OAAA,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,EAArB,CAAqB,CAAC,CAAC,CAAC;IAClC,CAAC;IACS,6CAAc,GAAxB,UAAyB,SAAkC,EAAE,EAAQ,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAItF,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE;YACvE,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAID,IAAI,SAAS,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;YAClC,oBAAoB,CAAC,EAAE,CAAC,CAAC;YACzB,SAAS,CAAC,SAAS,GAAG,SAAS,CAAC;SACjC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IACH,2BAAC;AAAD,CAAC,AArCD,CAA6C,yBAAW,GAqCvD;AArCY,oDAAoB"}

View File

@ -0,0 +1,5 @@
import { AsyncAction } from './AsyncAction';
import { AsyncScheduler } from './AsyncScheduler';
export declare class AnimationFrameScheduler extends AsyncScheduler {
flush(action?: AsyncAction<any>): void;
}

View File

@ -0,0 +1,46 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var AsyncScheduler_1 = require("./AsyncScheduler");
var AnimationFrameScheduler = (function (_super) {
__extends(AnimationFrameScheduler, _super);
function AnimationFrameScheduler() {
return _super !== null && _super.apply(this, arguments) || this;
}
AnimationFrameScheduler.prototype.flush = function (action) {
this.active = true;
this.scheduled = undefined;
var actions = this.actions;
var error;
var index = -1;
var count = actions.length;
action = action || actions.shift();
do {
if (error = action.execute(action.state, action.delay)) {
break;
}
} while (++index < count && (action = actions.shift()));
this.active = false;
if (error) {
while (++index < count && (action = actions.shift())) {
action.unsubscribe();
}
throw error;
}
};
return AnimationFrameScheduler;
}(AsyncScheduler_1.AsyncScheduler));
exports.AnimationFrameScheduler = AnimationFrameScheduler;
//# sourceMappingURL=AnimationFrameScheduler.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"AnimationFrameScheduler.js","sources":["../../src/internal/scheduler/AnimationFrameScheduler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,mDAAkD;AAElD;IAA6C,2CAAc;IAA3D;;IA2BA,CAAC;IA1BQ,uCAAK,GAAZ,UAAa,MAAyB;QAEpC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAEpB,IAAA,sBAAO,CAAS;QACvB,IAAI,KAAU,CAAC;QACf,IAAI,KAAK,GAAW,CAAC,CAAC,CAAC;QACvB,IAAI,KAAK,GAAW,OAAO,CAAC,MAAM,CAAC;QACnC,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAEnC,GAAG;YACD,IAAI,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE;gBACtD,MAAM;aACP;SACF,QAAQ,EAAE,KAAK,GAAG,KAAK,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,EAAE;QAExD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QAEpB,IAAI,KAAK,EAAE;YACT,OAAO,EAAE,KAAK,GAAG,KAAK,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,EAAE;gBACpD,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;IACH,8BAAC;AAAD,CAAC,AA3BD,CAA6C,+BAAc,GA2B1D;AA3BY,0DAAuB"}

15
node_modules/rxjs/internal/scheduler/AsapAction.d.ts generated vendored Normal file
View File

@ -0,0 +1,15 @@
import { AsyncAction } from './AsyncAction';
import { AsapScheduler } from './AsapScheduler';
import { SchedulerAction } from '../types';
/**
* We need this JSDoc comment for affecting ESDoc.
* @ignore
* @extends {Ignored}
*/
export declare class AsapAction<T> extends AsyncAction<T> {
protected scheduler: AsapScheduler;
protected work: (this: SchedulerAction<T>, state?: T) => void;
constructor(scheduler: AsapScheduler, work: (this: SchedulerAction<T>, state?: T) => void);
protected requestAsyncId(scheduler: AsapScheduler, id?: any, delay?: number): any;
protected recycleAsyncId(scheduler: AsapScheduler, id?: any, delay?: number): any;
}

48
node_modules/rxjs/internal/scheduler/AsapAction.js generated vendored Normal file
View File

@ -0,0 +1,48 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Immediate_1 = require("../util/Immediate");
var AsyncAction_1 = require("./AsyncAction");
var AsapAction = (function (_super) {
__extends(AsapAction, _super);
function AsapAction(scheduler, work) {
var _this = _super.call(this, scheduler, work) || this;
_this.scheduler = scheduler;
_this.work = work;
return _this;
}
AsapAction.prototype.requestAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
if (delay !== null && delay > 0) {
return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
}
scheduler.actions.push(this);
return scheduler.scheduled || (scheduler.scheduled = Immediate_1.Immediate.setImmediate(scheduler.flush.bind(scheduler, null)));
};
AsapAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);
}
if (scheduler.actions.length === 0) {
Immediate_1.Immediate.clearImmediate(id);
scheduler.scheduled = undefined;
}
return undefined;
};
return AsapAction;
}(AsyncAction_1.AsyncAction));
exports.AsapAction = AsapAction;
//# sourceMappingURL=AsapAction.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"AsapAction.js","sources":["../../src/internal/scheduler/AsapAction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAA8C;AAC9C,6CAA4C;AAQ5C;IAAmC,8BAAc;IAE/C,oBAAsB,SAAwB,EACxB,IAAmD;QADzE,YAEE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAHqB,eAAS,GAAT,SAAS,CAAe;QACxB,UAAI,GAAJ,IAAI,CAA+C;;IAEzE,CAAC;IAES,mCAAc,GAAxB,UAAyB,SAAwB,EAAE,EAAQ,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAE5E,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC,EAAE;YAC/B,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAED,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAI7B,OAAO,SAAS,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,qBAAS,CAAC,YAAY,CACzE,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CACtC,CAAC,CAAC;IACL,CAAC;IACS,mCAAc,GAAxB,UAAyB,SAAwB,EAAE,EAAQ,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAI5E,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE;YACvE,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAID,IAAI,SAAS,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;YAClC,qBAAS,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;YAC7B,SAAS,CAAC,SAAS,GAAG,SAAS,CAAC;SACjC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IACH,iBAAC;AAAD,CAAC,AAtCD,CAAmC,yBAAW,GAsC7C;AAtCY,gCAAU"}

View File

@ -0,0 +1,5 @@
import { AsyncAction } from './AsyncAction';
import { AsyncScheduler } from './AsyncScheduler';
export declare class AsapScheduler extends AsyncScheduler {
flush(action?: AsyncAction<any>): void;
}

46
node_modules/rxjs/internal/scheduler/AsapScheduler.js generated vendored Normal file
View File

@ -0,0 +1,46 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var AsyncScheduler_1 = require("./AsyncScheduler");
var AsapScheduler = (function (_super) {
__extends(AsapScheduler, _super);
function AsapScheduler() {
return _super !== null && _super.apply(this, arguments) || this;
}
AsapScheduler.prototype.flush = function (action) {
this.active = true;
this.scheduled = undefined;
var actions = this.actions;
var error;
var index = -1;
var count = actions.length;
action = action || actions.shift();
do {
if (error = action.execute(action.state, action.delay)) {
break;
}
} while (++index < count && (action = actions.shift()));
this.active = false;
if (error) {
while (++index < count && (action = actions.shift())) {
action.unsubscribe();
}
throw error;
}
};
return AsapScheduler;
}(AsyncScheduler_1.AsyncScheduler));
exports.AsapScheduler = AsapScheduler;
//# sourceMappingURL=AsapScheduler.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"AsapScheduler.js","sources":["../../src/internal/scheduler/AsapScheduler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,mDAAkD;AAElD;IAAmC,iCAAc;IAAjD;;IA2BA,CAAC;IA1BQ,6BAAK,GAAZ,UAAa,MAAyB;QAEpC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAEpB,IAAA,sBAAO,CAAS;QACvB,IAAI,KAAU,CAAC;QACf,IAAI,KAAK,GAAW,CAAC,CAAC,CAAC;QACvB,IAAI,KAAK,GAAW,OAAO,CAAC,MAAM,CAAC;QACnC,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAEnC,GAAG;YACD,IAAI,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE;gBACtD,MAAM;aACP;SACF,QAAQ,EAAE,KAAK,GAAG,KAAK,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,EAAE;QAExD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QAEpB,IAAI,KAAK,EAAE;YACT,OAAO,EAAE,KAAK,GAAG,KAAK,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,EAAE;gBACpD,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AA3BD,CAAmC,+BAAc,GA2BhD;AA3BY,sCAAa"}

29
node_modules/rxjs/internal/scheduler/AsyncAction.d.ts generated vendored Normal file
View File

@ -0,0 +1,29 @@
import { Action } from './Action';
import { SchedulerAction } from '../types';
import { Subscription } from '../Subscription';
import { AsyncScheduler } from './AsyncScheduler';
/**
* We need this JSDoc comment for affecting ESDoc.
* @ignore
* @extends {Ignored}
*/
export declare class AsyncAction<T> extends Action<T> {
protected scheduler: AsyncScheduler;
protected work: (this: SchedulerAction<T>, state?: T) => void;
id: any;
state: T;
delay: number;
protected pending: boolean;
constructor(scheduler: AsyncScheduler, work: (this: SchedulerAction<T>, state?: T) => void);
schedule(state?: T, delay?: number): Subscription;
protected requestAsyncId(scheduler: AsyncScheduler, id?: any, delay?: number): any;
protected recycleAsyncId(scheduler: AsyncScheduler, id: any, delay?: number): any;
/**
* Immediately executes this action and the `work` it contains.
* @return {any}
*/
execute(state: T, delay: number): any;
protected _execute(state: T, delay: number): any;
/** @deprecated This is an internal implementation detail, do not use. */
_unsubscribe(): void;
}

102
node_modules/rxjs/internal/scheduler/AsyncAction.js generated vendored Normal file
View File

@ -0,0 +1,102 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Action_1 = require("./Action");
var AsyncAction = (function (_super) {
__extends(AsyncAction, _super);
function AsyncAction(scheduler, work) {
var _this = _super.call(this, scheduler, work) || this;
_this.scheduler = scheduler;
_this.work = work;
_this.pending = false;
return _this;
}
AsyncAction.prototype.schedule = function (state, delay) {
if (delay === void 0) { delay = 0; }
if (this.closed) {
return this;
}
this.state = state;
var id = this.id;
var scheduler = this.scheduler;
if (id != null) {
this.id = this.recycleAsyncId(scheduler, id, delay);
}
this.pending = true;
this.delay = delay;
this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);
return this;
};
AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
return setInterval(scheduler.flush.bind(scheduler, this), delay);
};
AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
if (delay !== null && this.delay === delay && this.pending === false) {
return id;
}
clearInterval(id);
return undefined;
};
AsyncAction.prototype.execute = function (state, delay) {
if (this.closed) {
return new Error('executing a cancelled action');
}
this.pending = false;
var error = this._execute(state, delay);
if (error) {
return error;
}
else if (this.pending === false && this.id != null) {
this.id = this.recycleAsyncId(this.scheduler, this.id, null);
}
};
AsyncAction.prototype._execute = function (state, delay) {
var errored = false;
var errorValue = undefined;
try {
this.work(state);
}
catch (e) {
errored = true;
errorValue = !!e && e || new Error(e);
}
if (errored) {
this.unsubscribe();
return errorValue;
}
};
AsyncAction.prototype._unsubscribe = function () {
var id = this.id;
var scheduler = this.scheduler;
var actions = scheduler.actions;
var index = actions.indexOf(this);
this.work = null;
this.state = null;
this.pending = false;
this.scheduler = null;
if (index !== -1) {
actions.splice(index, 1);
}
if (id != null) {
this.id = this.recycleAsyncId(scheduler, id, null);
}
this.delay = null;
};
return AsyncAction;
}(Action_1.Action));
exports.AsyncAction = AsyncAction;
//# sourceMappingURL=AsyncAction.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"AsyncAction.js","sources":["../../src/internal/scheduler/AsyncAction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mCAAkC;AAUlC;IAAoC,+BAAS;IAO3C,qBAAsB,SAAyB,EACzB,IAAmD;QADzE,YAEE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAHqB,eAAS,GAAT,SAAS,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AEpC,IAAI,CAAC,IAAI,GAAI,IAAI,CAAC;QAClB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QAEtB,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;YAChB,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;SAC1B;QAED,IAAI,EAAE,IAAI,IAAI,EAAE;YACd,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;SACpD;QAED,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IACH,kBAAC;AAAD,CAAC,AAjJD,CAAoC,eAAM,GAiJzC;AAjJY,kCAAW"}

View File

@ -0,0 +1,27 @@
import { Scheduler } from '../Scheduler';
import { Action } from './Action';
import { AsyncAction } from './AsyncAction';
import { SchedulerAction } from '../types';
import { Subscription } from '../Subscription';
export declare class AsyncScheduler extends Scheduler {
static delegate?: Scheduler;
actions: Array<AsyncAction<any>>;
/**
* A flag to indicate whether the Scheduler is currently executing a batch of
* queued actions.
* @type {boolean}
* @deprecated internal use only
*/
active: boolean;
/**
* An internal ID used to track the latest asynchronous task such as those
* coming from `setTimeout`, `setInterval`, `requestAnimationFrame`, and
* others.
* @type {any}
* @deprecated internal use only
*/
scheduled: any;
constructor(SchedulerAction: typeof Action, now?: () => number);
schedule<T>(work: (this: SchedulerAction<T>, state?: T) => void, delay?: number, state?: T): Subscription;
flush(action: AsyncAction<any>): void;
}

67
node_modules/rxjs/internal/scheduler/AsyncScheduler.js generated vendored Normal file
View File

@ -0,0 +1,67 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Scheduler_1 = require("../Scheduler");
var AsyncScheduler = (function (_super) {
__extends(AsyncScheduler, _super);
function AsyncScheduler(SchedulerAction, now) {
if (now === void 0) { now = Scheduler_1.Scheduler.now; }
var _this = _super.call(this, SchedulerAction, function () {
if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) {
return AsyncScheduler.delegate.now();
}
else {
return now();
}
}) || this;
_this.actions = [];
_this.active = false;
_this.scheduled = undefined;
return _this;
}
AsyncScheduler.prototype.schedule = function (work, delay, state) {
if (delay === void 0) { delay = 0; }
if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {
return AsyncScheduler.delegate.schedule(work, delay, state);
}
else {
return _super.prototype.schedule.call(this, work, delay, state);
}
};
AsyncScheduler.prototype.flush = function (action) {
var actions = this.actions;
if (this.active) {
actions.push(action);
return;
}
var error;
this.active = true;
do {
if (error = action.execute(action.state, action.delay)) {
break;
}
} while (action = actions.shift());
this.active = false;
if (error) {
while (action = actions.shift()) {
action.unsubscribe();
}
throw error;
}
};
return AsyncScheduler;
}(Scheduler_1.Scheduler));
exports.AsyncScheduler = AsyncScheduler;
//# sourceMappingURL=AsyncScheduler.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"AsyncScheduler.js","sources":["../../src/internal/scheduler/AsyncScheduler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0CAAyC;AAMzC;IAAoC,kCAAS;IAmB3C,wBAAY,eAA8B,EAC9B,GAAiC;QAAjC,oBAAA,EAAA,MAAoB,qBAAS,CAAC,GAAG;QAD7C,YAEE,kBAAM,eAAe,EAAE;YACrB,IAAI,cAAc,CAAC,QAAQ,IAAI,cAAc,CAAC,QAAQ,KAAK,KAAI,EAAE;gBAC/D,OA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ED,CAAoC,qBAAS,GAiE5C;AAjEY,wCAAc"}

17
node_modules/rxjs/internal/scheduler/QueueAction.d.ts generated vendored Normal file
View File

@ -0,0 +1,17 @@
import { AsyncAction } from './AsyncAction';
import { Subscription } from '../Subscription';
import { QueueScheduler } from './QueueScheduler';
import { SchedulerAction } from '../types';
/**
* We need this JSDoc comment for affecting ESDoc.
* @ignore
* @extends {Ignored}
*/
export declare class QueueAction<T> extends AsyncAction<T> {
protected scheduler: QueueScheduler;
protected work: (this: SchedulerAction<T>, state?: T) => void;
constructor(scheduler: QueueScheduler, work: (this: SchedulerAction<T>, state?: T) => void);
schedule(state?: T, delay?: number): Subscription;
execute(state: T, delay: number): any;
protected requestAsyncId(scheduler: QueueScheduler, id?: any, delay?: number): any;
}

50
node_modules/rxjs/internal/scheduler/QueueAction.js generated vendored Normal file
View File

@ -0,0 +1,50 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var AsyncAction_1 = require("./AsyncAction");
var QueueAction = (function (_super) {
__extends(QueueAction, _super);
function QueueAction(scheduler, work) {
var _this = _super.call(this, scheduler, work) || this;
_this.scheduler = scheduler;
_this.work = work;
return _this;
}
QueueAction.prototype.schedule = function (state, delay) {
if (delay === void 0) { delay = 0; }
if (delay > 0) {
return _super.prototype.schedule.call(this, state, delay);
}
this.delay = delay;
this.state = state;
this.scheduler.flush(this);
return this;
};
QueueAction.prototype.execute = function (state, delay) {
return (delay > 0 || this.closed) ?
_super.prototype.execute.call(this, state, delay) :
this._execute(state, delay);
};
QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {
return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);
}
return scheduler.flush(this);
};
return QueueAction;
}(AsyncAction_1.AsyncAction));
exports.QueueAction = QueueAction;
//# sourceMappingURL=QueueAction.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"QueueAction.js","sources":["../../src/internal/scheduler/QueueAction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAA4C;AAU5C;IAAoC,+BAAc;IAEhD,qBAAsB,SAAyB,EACzB,IAAmD;QADzE,YAEE,kBAAM,SAAS,EAAE,IAAI,CAAC,SACvB;QAHqB,eAAS,GAAT,SAAS,CAAgB;QACzB,UAAI,GAAJ,IAAI,CAA+C;;IAEzE,CAAC;IAEM,8BAAQ,GAAf,UAAgB,KAAS,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAC1C,IAAI,KAAK,GAAG,CAAC,EAAE;YACb,OAAO,iBAAM,QAAQ,YAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACrC;QACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,6BAAO,GAAd,UAAe,KAAQ,EAAE,KAAa;QACpC,OAAO,CAAC,KAAK,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YACjC,iBAAM,OAAO,YAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;YAC7B,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAE;IACjC,CAAC;IAES,oCAAc,GAAxB,UAAyB,SAAyB,EAAE,EAAQ,EAAE,KAAiB;QAAjB,sBAAA,EAAA,SAAiB;QAI7E,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE;YACvE,OAAO,iBAAM,cAAc,YAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACnD;QAED,OAAO,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IACH,kBAAC;AAAD,CAAC,AAjCD,CAAoC,yBAAW,GAiC9C;AAjCY,kCAAW"}

View File

@ -0,0 +1,3 @@
import { AsyncScheduler } from './AsyncScheduler';
export declare class QueueScheduler extends AsyncScheduler {
}

25
node_modules/rxjs/internal/scheduler/QueueScheduler.js generated vendored Normal file
View File

@ -0,0 +1,25 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var AsyncScheduler_1 = require("./AsyncScheduler");
var QueueScheduler = (function (_super) {
__extends(QueueScheduler, _super);
function QueueScheduler() {
return _super !== null && _super.apply(this, arguments) || this;
}
return QueueScheduler;
}(AsyncScheduler_1.AsyncScheduler));
exports.QueueScheduler = QueueScheduler;
//# sourceMappingURL=QueueScheduler.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"QueueScheduler.js","sources":["../../src/internal/scheduler/QueueScheduler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAkD;AAElD;IAAoC,kCAAc;IAAlD;;IACA,CAAC;IAAD,qBAAC;AAAD,CAAC,AADD,CAAoC,+BAAc,GACjD;AADY,wCAAc"}

View File

@ -0,0 +1,33 @@
import { AsyncAction } from './AsyncAction';
import { Subscription } from '../Subscription';
import { AsyncScheduler } from './AsyncScheduler';
import { SchedulerAction } from '../types';
export declare class VirtualTimeScheduler extends AsyncScheduler {
maxFrames: number;
protected static frameTimeFactor: number;
frame: number;
index: number;
constructor(SchedulerAction?: typeof AsyncAction, maxFrames?: number);
/**
* Prompt the Scheduler to execute all of its queued actions, therefore
* clearing its queue.
* @return {void}
*/
flush(): void;
}
/**
* We need this JSDoc comment for affecting ESDoc.
* @nodoc
*/
export declare class VirtualAction<T> extends AsyncAction<T> {
protected scheduler: VirtualTimeScheduler;
protected work: (this: SchedulerAction<T>, state?: T) => void;
protected index: number;
protected active: boolean;
constructor(scheduler: VirtualTimeScheduler, work: (this: SchedulerAction<T>, state?: T) => void, index?: number);
schedule(state?: T, delay?: number): Subscription;
protected requestAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay?: number): any;
protected recycleAsyncId(scheduler: VirtualTimeScheduler, id?: any, delay?: number): any;
protected _execute(state: T, delay: number): any;
static sortActions<T>(a: VirtualAction<T>, b: VirtualAction<T>): 1 | 0 | -1;
}

View File

@ -0,0 +1,111 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var AsyncAction_1 = require("./AsyncAction");
var AsyncScheduler_1 = require("./AsyncScheduler");
var VirtualTimeScheduler = (function (_super) {
__extends(VirtualTimeScheduler, _super);
function VirtualTimeScheduler(SchedulerAction, maxFrames) {
if (SchedulerAction === void 0) { SchedulerAction = VirtualAction; }
if (maxFrames === void 0) { maxFrames = Number.POSITIVE_INFINITY; }
var _this = _super.call(this, SchedulerAction, function () { return _this.frame; }) || this;
_this.maxFrames = maxFrames;
_this.frame = 0;
_this.index = -1;
return _this;
}
VirtualTimeScheduler.prototype.flush = function () {
var _a = this, actions = _a.actions, maxFrames = _a.maxFrames;
var error, action;
while ((action = actions[0]) && action.delay <= maxFrames) {
actions.shift();
this.frame = action.delay;
if (error = action.execute(action.state, action.delay)) {
break;
}
}
if (error) {
while (action = actions.shift()) {
action.unsubscribe();
}
throw error;
}
};
VirtualTimeScheduler.frameTimeFactor = 10;
return VirtualTimeScheduler;
}(AsyncScheduler_1.AsyncScheduler));
exports.VirtualTimeScheduler = VirtualTimeScheduler;
var VirtualAction = (function (_super) {
__extends(VirtualAction, _super);
function VirtualAction(scheduler, work, index) {
if (index === void 0) { index = scheduler.index += 1; }
var _this = _super.call(this, scheduler, work) || this;
_this.scheduler = scheduler;
_this.work = work;
_this.index = index;
_this.active = true;
_this.index = scheduler.index = index;
return _this;
}
VirtualAction.prototype.schedule = function (state, delay) {
if (delay === void 0) { delay = 0; }
if (!this.id) {
return _super.prototype.schedule.call(this, state, delay);
}
this.active = false;
var action = new VirtualAction(this.scheduler, this.work);
this.add(action);
return action.schedule(state, delay);
};
VirtualAction.prototype.requestAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
this.delay = scheduler.frame + delay;
var actions = scheduler.actions;
actions.push(this);
actions.sort(VirtualAction.sortActions);
return true;
};
VirtualAction.prototype.recycleAsyncId = function (scheduler, id, delay) {
if (delay === void 0) { delay = 0; }
return undefined;
};
VirtualAction.prototype._execute = function (state, delay) {
if (this.active === true) {
return _super.prototype._execute.call(this, state, delay);
}
};
VirtualAction.sortActions = function (a, b) {
if (a.delay === b.delay) {
if (a.index === b.index) {
return 0;
}
else if (a.index > b.index) {
return 1;
}
else {
return -1;
}
}
else if (a.delay > b.delay) {
return 1;
}
else {
return -1;
}
};
return VirtualAction;
}(AsyncAction_1.AsyncAction));
exports.VirtualAction = VirtualAction;
//# sourceMappingURL=VirtualTimeScheduler.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"VirtualTimeScheduler.js","sources":["../../src/internal/scheduler/VirtualTimeScheduler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAA4C;AAE5C,mDAAkD;AAGlD;IAA0C,wCAAc;IAOtD,8BAAY,eAA0D,EACnD,SAA4C;QADnD,gCAAA,EAAA,kBAAsC,aAAoB;QACnD,0BAAA,EAAA,YAAoB,MAAM,CAAC,iBAAiB;QAD/D,YAEE,kBAAM,eAAe,EAAE,cAAM,OAAA,KAAI,CAAC,KAAK,EAAV,CAAU,CAAC,SACzC;QAFkB,eAAS,GAAT,SAAS,CAAmC;QAJxD,WAAK,GAAW,CAAC,CAAC;QAClB,WAAK,GAAW,CAAC,CAAC,CAAC;;IAK1B,CAAC;IAOM,oCAAK,GAAZ;QAEQ,IAAA,SAA2B,EAA1B,oBAAO,EAAE,wBAAS,CAAS;QAClC,IAAI,KAAU,EAAE,MAAwB,CAAC;QAEzC,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,KAAK,IAAI,SAAS,EAAE;YACzD,OAAO,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;YAE1B,IAAI,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE;gBACtD,MAAM;aACP;SACF;QAED,IAAI,KAAK,EAAE;YACT,OAAO,MAAM,GAAG,OAAO,CAAC,KAAK,EAAE,EAAE;gBAC/B,MAAM,CAAC,WAAW,EAAE,CAAC;aACtB;YACD,MAAM,KAAK,CAAC;SACb;IACH,CAAC;IAnCgB,oCAAe,GAAW,EAAE,CAAC;IAoChD,2BAAC;CAAA,AAtCD,CAA0C,+BAAc,GAsCvD;AAtCY,oDAA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;QAAjB,sBAAA,EAAA,SAAiB;QACnF,OAAO,SAAS,CAAC;IACnB,CAAC;IAES,gCAAQ,GAAlB,UAAmB,KAAQ,EAAE,KAAa;QACxC,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,EAAE;YACxB,OAAO,iBAAM,QAAQ,YAAC,KAAK,EAAE,KAAK,CAAC,CAAC;SACrC;IACH,CAAC;IAEa,yBAAW,GAAzB,UAA6B,CAAmB,EAAE,CAAmB;QACnE,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,EAAE;YACvB,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,EAAE;gBACvB,OAAO,CAAC,CAAC;aACV;iBAAM,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE;gBAC5B,OAAO,CAAC,CAAC;aACV;iBAAM;gBACL,OAAO,CAAC,CAAC,CAAC;aACX;SACF;aAAM,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,EAAE;YAC5B,OAAO,CAAC,CAAC;SACV;aAAM;YACL,OAAO,CAAC,CAAC,CAAC;SACX;IACH,CAAC;IACH,oBAAC;AAAD,CAAC,AA1DD,CAAsC,yBAAW,GA0DhD;AA1DY,sCAAa"}

View File

@ -0,0 +1,37 @@
import { AnimationFrameScheduler } from './AnimationFrameScheduler';
/**
*
* Animation Frame Scheduler
*
* <span class="informal">Perform task when `window.requestAnimationFrame` would fire</span>
*
* When `animationFrame` scheduler is used with delay, it will fall back to {@link asyncScheduler} scheduler
* behaviour.
*
* Without delay, `animationFrame` scheduler can be used to create smooth browser animations.
* It makes sure scheduled task will happen just before next browser content repaint,
* thus performing animations as efficiently as possible.
*
* ## Example
* Schedule div height animation
* ```ts
* // html: <div style="background: #0ff;"></div>
* import { animationFrameScheduler } from 'rxjs';
*
* const div = document.querySelector('div');
*
* animationFrameScheduler.schedule(function(height) {
* div.style.height = height + "px";
*
* this.schedule(height + 1); // `this` references currently executing Action,
* // which we reschedule with new state
* }, 0, 0);
*
* // You will see a div element growing in height
* ```
*
* @static true
* @name animationFrame
* @owner Scheduler
*/
export declare const animationFrame: AnimationFrameScheduler;

View File

@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var AnimationFrameAction_1 = require("./AnimationFrameAction");
var AnimationFrameScheduler_1 = require("./AnimationFrameScheduler");
exports.animationFrame = new AnimationFrameScheduler_1.AnimationFrameScheduler(AnimationFrameAction_1.AnimationFrameAction);
//# sourceMappingURL=animationFrame.js.map

View File

@ -0,0 +1 @@
{"version":3,"file":"animationFrame.js","sources":["../../src/internal/scheduler/animationFrame.ts"],"names":[],"mappings":";;AAAA,+DAA8D;AAC9D,qEAAoE;AAsCvD,QAAA,cAAc,GAAG,IAAI,iDAAuB,CAAC,2CAAoB,CAAC,CAAC"}

39
node_modules/rxjs/internal/scheduler/asap.d.ts generated vendored Normal file
View File

@ -0,0 +1,39 @@
import { AsapScheduler } from './AsapScheduler';
/**
*
* Asap Scheduler
*
* <span class="informal">Perform task as fast as it can be performed asynchronously</span>
*
* `asap` scheduler behaves the same as {@link asyncScheduler} scheduler when you use it to delay task
* in time. If however you set delay to `0`, `asap` will wait for current synchronously executing
* code to end and then it will try to execute given task as fast as possible.
*
* `asap` scheduler will do its best to minimize time between end of currently executing code
* and start of scheduled task. This makes it best candidate for performing so called "deferring".
* Traditionally this was achieved by calling `setTimeout(deferredTask, 0)`, but that technique involves
* some (although minimal) unwanted delay.
*
* Note that using `asap` scheduler does not necessarily mean that your task will be first to process
* after currently executing code. In particular, if some task was also scheduled with `asap` before,
* that task will execute first. That being said, if you need to schedule task asynchronously, but
* as soon as possible, `asap` scheduler is your best bet.
*
* ## Example
* Compare async and asap scheduler<
* ```ts
* import { asapScheduler, asyncScheduler } from 'rxjs';
*
* asyncScheduler.schedule(() => console.log('async')); // scheduling 'async' first...
* asapScheduler.schedule(() => console.log('asap'));
*
* // Logs:
* // "asap"
* // "async"
* // ... but 'asap' goes first!
* ```
* @static true
* @name asap
* @owner Scheduler
*/
export declare const asap: AsapScheduler;

6
node_modules/rxjs/internal/scheduler/asap.js generated vendored Normal file
View File

@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var AsapAction_1 = require("./AsapAction");
var AsapScheduler_1 = require("./AsapScheduler");
exports.asap = new AsapScheduler_1.AsapScheduler(AsapAction_1.AsapAction);
//# sourceMappingURL=asap.js.map

1
node_modules/rxjs/internal/scheduler/asap.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"asap.js","sources":["../../src/internal/scheduler/asap.ts"],"names":[],"mappings":";;AAAA,2CAA0C;AAC1C,iDAAgD;AAwCnC,QAAA,IAAI,GAAG,IAAI,6BAAa,CAAC,uBAAU,CAAC,CAAC"}

52
node_modules/rxjs/internal/scheduler/async.d.ts generated vendored Normal file
View File

@ -0,0 +1,52 @@
import { AsyncScheduler } from './AsyncScheduler';
/**
*
* Async Scheduler
*
* <span class="informal">Schedule task as if you used setTimeout(task, duration)</span>
*
* `async` scheduler schedules tasks asynchronously, by putting them on the JavaScript
* event loop queue. It is best used to delay tasks in time or to schedule tasks repeating
* in intervals.
*
* If you just want to "defer" task, that is to perform it right after currently
* executing synchronous code ends (commonly achieved by `setTimeout(deferredTask, 0)`),
* better choice will be the {@link asapScheduler} scheduler.
*
* ## Examples
* Use async scheduler to delay task
* ```ts
* import { asyncScheduler } from 'rxjs';
*
* const task = () => console.log('it works!');
*
* asyncScheduler.schedule(task, 2000);
*
* // After 2 seconds logs:
* // "it works!"
* ```
*
* Use async scheduler to repeat task in intervals
* ```ts
* import { asyncScheduler } from 'rxjs';
*
* function task(state) {
* console.log(state);
* this.schedule(state + 1, 1000); // `this` references currently executing Action,
* // which we reschedule with new state and delay
* }
*
* asyncScheduler.schedule(task, 3000, 0);
*
* // Logs:
* // 0 after 3s
* // 1 after 4s
* // 2 after 5s
* // 3 after 6s
* ```
*
* @static true
* @name async
* @owner Scheduler
*/
export declare const async: AsyncScheduler;

6
node_modules/rxjs/internal/scheduler/async.js generated vendored Normal file
View File

@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var AsyncAction_1 = require("./AsyncAction");
var AsyncScheduler_1 = require("./AsyncScheduler");
exports.async = new AsyncScheduler_1.AsyncScheduler(AsyncAction_1.AsyncAction);
//# sourceMappingURL=async.js.map

1
node_modules/rxjs/internal/scheduler/async.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"async.js","sources":["../../src/internal/scheduler/async.ts"],"names":[],"mappings":";;AAAA,6CAA4C;AAC5C,mDAAkD;AAqDrC,QAAA,KAAK,GAAG,IAAI,+BAAc,CAAC,yBAAW,CAAC,CAAC"}

68
node_modules/rxjs/internal/scheduler/queue.d.ts generated vendored Normal file
View File

@ -0,0 +1,68 @@
import { QueueScheduler } from './QueueScheduler';
/**
*
* Queue Scheduler
*
* <span class="informal">Put every next task on a queue, instead of executing it immediately</span>
*
* `queue` scheduler, when used with delay, behaves the same as {@link asyncScheduler} scheduler.
*
* When used without delay, it schedules given task synchronously - executes it right when
* it is scheduled. However when called recursively, that is when inside the scheduled task,
* another task is scheduled with queue scheduler, instead of executing immediately as well,
* that task will be put on a queue and wait for current one to finish.
*
* This means that when you execute task with `queue` scheduler, you are sure it will end
* before any other task scheduled with that scheduler will start.
*
* ## Examples
* Schedule recursively first, then do something
* ```ts
* import { queueScheduler } from 'rxjs';
*
* queueScheduler.schedule(() => {
* queueScheduler.schedule(() => console.log('second')); // will not happen now, but will be put on a queue
*
* console.log('first');
* });
*
* // Logs:
* // "first"
* // "second"
* ```
*
* Reschedule itself recursively
* ```ts
* import { queueScheduler } from 'rxjs';
*
* queueScheduler.schedule(function(state) {
* if (state !== 0) {
* console.log('before', state);
* this.schedule(state - 1); // `this` references currently executing Action,
* // which we reschedule with new state
* console.log('after', state);
* }
* }, 0, 3);
*
* // In scheduler that runs recursively, you would expect:
* // "before", 3
* // "before", 2
* // "before", 1
* // "after", 1
* // "after", 2
* // "after", 3
*
* // But with queue it logs:
* // "before", 3
* // "after", 3
* // "before", 2
* // "after", 2
* // "before", 1
* // "after", 1
* ```
*
* @static true
* @name queue
* @owner Scheduler
*/
export declare const queue: QueueScheduler;

6
node_modules/rxjs/internal/scheduler/queue.js generated vendored Normal file
View File

@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var QueueAction_1 = require("./QueueAction");
var QueueScheduler_1 = require("./QueueScheduler");
exports.queue = new QueueScheduler_1.QueueScheduler(QueueAction_1.QueueAction);
//# sourceMappingURL=queue.js.map

1
node_modules/rxjs/internal/scheduler/queue.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"queue.js","sources":["../../src/internal/scheduler/queue.ts"],"names":[],"mappings":";;AAAA,6CAA4C;AAC5C,mDAAkD;AAqErC,QAAA,KAAK,GAAG,IAAI,+BAAc,CAAC,yBAAW,CAAC,CAAC"}