1 import { Notification } from '../Notification';
2 import { OperatorFunction } from '../types';
4 * Converts an Observable of {@link Notification} objects into the emissions
7 * <span class="informal">Unwraps {@link Notification} objects as actual `next`,
8 * `error` and `complete` emissions. The opposite of {@link materialize}.</span>
10 * ![](dematerialize.png)
12 * `dematerialize` is assumed to operate an Observable that only emits
13 * {@link Notification} objects as `next` emissions, and does not emit any
14 * `error`. Such Observable is the output of a `materialize` operation. Those
15 * notifications are then unwrapped using the metadata they contain, and emitted
16 * as `next`, `error`, and `complete` on the output Observable.
18 * Use this operator in conjunction with {@link materialize}.
21 * Convert an Observable of Notifications to an actual Observable
23 * import { of, Notification } from 'rxjs';
24 * import { dematerialize } from 'rxjs/operators';
26 * const notifA = new Notification('N', 'A');
27 * const notifB = new Notification('N', 'B');
28 * const notifE = new Notification('E', undefined,
29 * new TypeError('x.toUpperCase is not a function')
31 * const materialized = of(notifA, notifB, notifE);
32 * const upperCase = materialized.pipe(dematerialize());
33 * upperCase.subscribe(x => console.log(x), e => console.error(e));
38 * // TypeError: x.toUpperCase is not a function
41 * @see {@link Notification}
42 * @see {@link materialize}
44 * @return {Observable} An Observable that emits items and notifications
45 * embedded in Notification objects emitted by the source Observable.
46 * @method dematerialize
49 export declare function dematerialize<T>(): OperatorFunction<Notification<T>, T>;