Tumortisch-Dist/resources/app/node_modules/rxjs/operator/auditTime.js.map
2021-06-15 16:00:08 +02:00

1 line
2.8 KiB
Plaintext

{"version":3,"file":"auditTime.js","sourceRoot":"","sources":["../../src/operator/auditTime.ts"],"names":[],"mappings":";AAAA,sBAAsB,oBAAoB,CAAC,CAAA;AAG3C,0BAAyC,wBAAwB,CAAC,CAAA;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,mBAAkD,QAAgB,EAAE,SAA6B;IAA7B,yBAA6B,GAA7B,yBAA6B;IAC/F,MAAM,CAAC,qBAAW,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,IAAI,CAAkB,CAAC;AACjE,CAAC;AAFe,iBAAS,YAExB,CAAA","sourcesContent":["import { async } from '../scheduler/async';\nimport { IScheduler } from '../Scheduler';\nimport { Observable } from '../Observable';\nimport { auditTime as higherOrder } from '../operators/auditTime';\n\n/**\n * Ignores source values for `duration` milliseconds, then emits the most recent\n * value from the source Observable, then repeats this process.\n *\n * <span class=\"informal\">When it sees a source values, it ignores that plus\n * the next ones for `duration` milliseconds, and then it emits the most recent\n * value from the source.</span>\n *\n * <img src=\"./img/auditTime.png\" width=\"100%\">\n *\n * `auditTime` is similar to `throttleTime`, but emits the last value from the\n * silenced time window, instead of the first value. `auditTime` emits the most\n * recent value from the source Observable on the output Observable as soon as\n * its internal timer becomes disabled, and ignores source values while the\n * timer is enabled. Initially, the timer is disabled. As soon as the first\n * source value arrives, the timer is enabled. After `duration` milliseconds (or\n * the time unit determined internally by the optional `scheduler`) has passed,\n * the timer is disabled, then the most recent source value is emitted on the\n * output Observable, and this process repeats for the next source value.\n * Optionally takes a {@link IScheduler} for managing timers.\n *\n * @example <caption>Emit clicks at a rate of at most one click per second</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var result = clicks.auditTime(1000);\n * result.subscribe(x => console.log(x));\n *\n * @see {@link audit}\n * @see {@link debounceTime}\n * @see {@link delay}\n * @see {@link sampleTime}\n * @see {@link throttleTime}\n *\n * @param {number} duration Time to wait before emitting the most recent source\n * value, measured in milliseconds or the time unit determined internally\n * by the optional `scheduler`.\n * @param {Scheduler} [scheduler=async] The {@link IScheduler} to use for\n * managing the timers that handle the rate-limiting behavior.\n * @return {Observable<T>} An Observable that performs rate-limiting of\n * emissions from the source Observable.\n * @method auditTime\n * @owner Observable\n */\nexport function auditTime<T>(this: Observable<T>, duration: number, scheduler: IScheduler = async): Observable<T> {\n return higherOrder(duration, scheduler)(this) as Observable<T>;\n}"]}