1 | /** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
|
---|
2 | import * as tslib_1 from "tslib";
|
---|
3 | import { Subscriber } from '../Subscriber';
|
---|
4 | import { Notification } from '../Notification';
|
---|
5 | export function materialize() {
|
---|
6 | return function materializeOperatorFunction(source) {
|
---|
7 | return source.lift(new MaterializeOperator());
|
---|
8 | };
|
---|
9 | }
|
---|
10 | var MaterializeOperator = /*@__PURE__*/ (function () {
|
---|
11 | function MaterializeOperator() {
|
---|
12 | }
|
---|
13 | MaterializeOperator.prototype.call = function (subscriber, source) {
|
---|
14 | return source.subscribe(new MaterializeSubscriber(subscriber));
|
---|
15 | };
|
---|
16 | return MaterializeOperator;
|
---|
17 | }());
|
---|
18 | var MaterializeSubscriber = /*@__PURE__*/ (function (_super) {
|
---|
19 | tslib_1.__extends(MaterializeSubscriber, _super);
|
---|
20 | function MaterializeSubscriber(destination) {
|
---|
21 | return _super.call(this, destination) || this;
|
---|
22 | }
|
---|
23 | MaterializeSubscriber.prototype._next = function (value) {
|
---|
24 | this.destination.next(Notification.createNext(value));
|
---|
25 | };
|
---|
26 | MaterializeSubscriber.prototype._error = function (err) {
|
---|
27 | var destination = this.destination;
|
---|
28 | destination.next(Notification.createError(err));
|
---|
29 | destination.complete();
|
---|
30 | };
|
---|
31 | MaterializeSubscriber.prototype._complete = function () {
|
---|
32 | var destination = this.destination;
|
---|
33 | destination.next(Notification.createComplete());
|
---|
34 | destination.complete();
|
---|
35 | };
|
---|
36 | return MaterializeSubscriber;
|
---|
37 | }(Subscriber));
|
---|
38 | //# sourceMappingURL=materialize.js.map
|
---|