mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-26 22:15:06 +08:00
# Conflicts: # jsowell-ui/.env.development # jsowell-ui/.env.staging # jsowell-ui/bin/build-sit.bat # jsowell-ui/bin/build.bat # jsowell-ui/src/api/adapayMember/adapayMember.js # jsowell-ui/src/api/pile/merchant.js # jsowell-ui/src/router/index.js # jsowell-ui/src/views/financial/financeDetail.vue # jsowell-ui/src/views/financial/merchant.vue # jsowell-ui/src/views/homeIndex/homeIndex.vue # jsowell-ui/src/views/login.vue # jsowell-ui/src/views/pile/basic/detail.vue # jsowell-ui/src/views/pile/station/components/SiteInfo.vue # jsowell-ui/src/views/pile/station/detail.vue # jsowell-ui/src/views/pile/station/orderReport.vue
50 lines
1.8 KiB
TypeScript
50 lines
1.8 KiB
TypeScript
import { Notification } from '../Notification';
|
|
import { OperatorFunction } from '../types';
|
|
/**
|
|
* Converts an Observable of {@link Notification} objects into the emissions
|
|
* that they represent.
|
|
*
|
|
* <span class="informal">Unwraps {@link Notification} objects as actual `next`,
|
|
* `error` and `complete` emissions. The opposite of {@link materialize}.</span>
|
|
*
|
|
* 
|
|
*
|
|
* `dematerialize` is assumed to operate an Observable that only emits
|
|
* {@link Notification} objects as `next` emissions, and does not emit any
|
|
* `error`. Such Observable is the output of a `materialize` operation. Those
|
|
* notifications are then unwrapped using the metadata they contain, and emitted
|
|
* as `next`, `error`, and `complete` on the output Observable.
|
|
*
|
|
* Use this operator in conjunction with {@link materialize}.
|
|
*
|
|
* ## Example
|
|
* Convert an Observable of Notifications to an actual Observable
|
|
* ```ts
|
|
* import { of, Notification } from 'rxjs';
|
|
* import { dematerialize } from 'rxjs/operators';
|
|
*
|
|
* const notifA = new Notification('N', 'A');
|
|
* const notifB = new Notification('N', 'B');
|
|
* const notifE = new Notification('E', undefined,
|
|
* new TypeError('x.toUpperCase is not a function')
|
|
* );
|
|
* const materialized = of(notifA, notifB, notifE);
|
|
* const upperCase = materialized.pipe(dematerialize());
|
|
* upperCase.subscribe(x => console.log(x), e => console.error(e));
|
|
*
|
|
* // Results in:
|
|
* // A
|
|
* // B
|
|
* // TypeError: x.toUpperCase is not a function
|
|
* ```
|
|
*
|
|
* @see {@link Notification}
|
|
* @see {@link materialize}
|
|
*
|
|
* @return {Observable} An Observable that emits items and notifications
|
|
* embedded in Notification objects emitted by the source Observable.
|
|
* @method dematerialize
|
|
* @owner Observable
|
|
*/
|
|
export declare function dematerialize<T>(): OperatorFunction<Notification<T>, T>;
|