Tumortisch-Dist/resources/app/node_modules/rxjs/operator/do.js.map

1 line
3.0 KiB
Plaintext
Raw Permalink Normal View History

2021-06-15 16:00:08 +02:00
{"version":3,"file":"do.js","sourceRoot":"","sources":["../../src/operator/do.ts"],"names":[],"mappings":";AAGA,oBAAmC,kBAAkB,CAAC,CAAA;AAKtD,mCAAmC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,aAA4C,cAAsD,EAC3E,KAAwB,EACxB,QAAqB;IAC1C,MAAM,CAAC,SAAW,CAAM,cAAc,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAkB,CAAC;AAClF,CAAC;AAJe,WAAG,MAIlB,CAAA","sourcesContent":["\nimport { Observable } from '../Observable';\nimport { PartialObserver } from '../Observer';\nimport { tap as higherOrder } from '../operators/tap';\n\n/* tslint:disable:max-line-length */\nexport function _do<T>(this: Observable<T>, next: (x: T) => void, error?: (e: any) => void, complete?: () => void): Observable<T>;\nexport function _do<T>(this: Observable<T>, observer: PartialObserver<T>): Observable<T>;\n/* tslint:enable:max-line-length */\n\n/**\n * Perform a side effect for every emission on the source Observable, but return\n * an Observable that is identical to the source.\n *\n * <span class=\"informal\">Intercepts each emission on the source and runs a\n * function, but returns an output which is identical to the source as long as errors don't occur.</span>\n *\n * <img src=\"./img/do.png\" width=\"100%\">\n *\n * Returns a mirrored Observable of the source Observable, but modified so that\n * the provided Observer is called to perform a side effect for every value,\n * error, and completion emitted by the source. Any errors that are thrown in\n * the aforementioned Observer or handlers are safely sent down the error path\n * of the output Observable.\n *\n * This operator is useful for debugging your Observables for the correct values\n * or performing other side effects.\n *\n * Note: this is different to a `subscribe` on the Observable. If the Observable\n * returned by `do` is not subscribed, the side effects specified by the\n * Observer will never happen. `do` therefore simply spies on existing\n * execution, it does not trigger an execution to happen like `subscribe` does.\n *\n * @example <caption>Map every click to the clientX position of that click, while also logging the click event</caption>\n * var clicks = Rx.Observable.fromEvent(document, 'click');\n * var positions = clicks\n * .do(ev => console.log(ev))\n * .map(ev => ev.clientX);\n * positions.subscribe(x => console.log(x));\n *\n * @see {@link map}\n * @see {@link subscribe}\n *\n * @param {Observer|function} [nextOrObserver] A normal Observer object or a\n * callback for `next`.\n * @param {function} [error] Callback for errors in the source.\n * @param {function} [complete] Callback for the completion of the source.\n * @return {Observable} An Observable identical to the source, but runs the\n * specified Observer or callback(s) for each item.\n * @method do\n * @name do\n * @owner Observable\n */\nexport function _do<T>(this: Observable<T>, nextOrObserver?: PartialObserver<T> | ((x: T) => void),\n error?: (e: any) => void,\n complete?: () => void): Observable<T> {\n return higherOrder(<any>nextOrObserver, error, complete)(this) as Observable<T>;\n}\n"]}