![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mets.corals.io/wp-content/themes/metras/node_modules/rxjs/_esm5/operator/ |
/** PURE_IMPORTS_START .._scheduler_async,.._operators_delay PURE_IMPORTS_END */ import { async } from '../scheduler/async'; import { delay as higherOrder } from '../operators/delay'; /** * Delays the emission of items from the source Observable by a given timeout or * until a given Date. * * <span class="informal">Time shifts each item by some specified amount of * milliseconds.</span> * * <img src="./img/delay.png" width="100%"> * * If the delay argument is a Number, this operator time shifts the source * Observable by that amount of time expressed in milliseconds. The relative * time intervals between the values are preserved. * * If the delay argument is a Date, this operator time shifts the start of the * Observable execution until the given date occurs. * * @example <caption>Delay each click by one second</caption> * var clicks = Rx.Observable.fromEvent(document, 'click'); * var delayedClicks = clicks.delay(1000); // each click emitted after 1 second * delayedClicks.subscribe(x => console.log(x)); * * @example <caption>Delay all clicks until a future date happens</caption> * var clicks = Rx.Observable.fromEvent(document, 'click'); * var date = new Date('March 15, 2050 12:00:00'); // in the future * var delayedClicks = clicks.delay(date); // click emitted only after that date * delayedClicks.subscribe(x => console.log(x)); * * @see {@link debounceTime} * @see {@link delayWhen} * * @param {number|Date} delay The delay duration in milliseconds (a `number`) or * a `Date` until which the emission of the source items is delayed. * @param {Scheduler} [scheduler=async] The IScheduler to use for * managing the timers that handle the time-shift for each item. * @return {Observable} An Observable that delays the emissions of the source * Observable by the specified timeout or Date. * @method delay * @owner Observable */ export function delay(delay, scheduler) { if (scheduler === void 0) { scheduler = async; } return higherOrder(delay, scheduler)(this); } //# sourceMappingURL=delay.js.map