![]() 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/metras.v32.1/node_modules/rxjs/operator/ |
"use strict"; var materialize_1 = require('../operators/materialize'); /** * Represents all of the notifications from the source Observable as `next` * emissions marked with their original types within {@link Notification} * objects. * * <span class="informal">Wraps `next`, `error` and `complete` emissions in * {@link Notification} objects, emitted as `next` on the output Observable. * </span> * * <img src="./img/materialize.png" width="100%"> * * `materialize` returns an Observable that emits a `next` notification for each * `next`, `error`, or `complete` emission of the source Observable. When the * source Observable emits `complete`, the output Observable will emit `next` as * a Notification of type "complete", and then it will emit `complete` as well. * When the source Observable emits `error`, the output will emit `next` as a * Notification of type "error", and then `complete`. * * This operator is useful for producing metadata of the source Observable, to * be consumed as `next` emissions. Use it in conjunction with * {@link dematerialize}. * * @example <caption>Convert a faulty Observable to an Observable of Notifications</caption> * var letters = Rx.Observable.of('a', 'b', 13, 'd'); * var upperCase = letters.map(x => x.toUpperCase()); * var materialized = upperCase.materialize(); * materialized.subscribe(x => console.log(x)); * * // Results in the following: * // - Notification {kind: "N", value: "A", error: undefined, hasValue: true} * // - Notification {kind: "N", value: "B", error: undefined, hasValue: true} * // - Notification {kind: "E", value: undefined, error: TypeError: * // x.toUpperCase is not a function at MapSubscriber.letters.map.x * // [as project] (http://1…, hasValue: false} * * @see {@link Notification} * @see {@link dematerialize} * * @return {Observable<Notification<T>>} An Observable that emits * {@link Notification} objects that wrap the original emissions from the source * Observable with metadata. * @method materialize * @owner Observable */ function materialize() { return materialize_1.materialize()(this); } exports.materialize = materialize; //# sourceMappingURL=materialize.js.map