bigint-crypto-utils/node_modules/rxjs/_esm5/internal/operators/materialize.js

39 lines
1.5 KiB
JavaScript
Raw Normal View History

/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */
import * as tslib_1 from "tslib";
import { Subscriber } from '../Subscriber';
import { Notification } from '../Notification';
export function materialize() {
return function materializeOperatorFunction(source) {
return source.lift(new MaterializeOperator());
};
}
var MaterializeOperator = /*@__PURE__*/ (function () {
function MaterializeOperator() {
}
MaterializeOperator.prototype.call = function (subscriber, source) {
return source.subscribe(new MaterializeSubscriber(subscriber));
};
return MaterializeOperator;
}());
var MaterializeSubscriber = /*@__PURE__*/ (function (_super) {
tslib_1.__extends(MaterializeSubscriber, _super);
function MaterializeSubscriber(destination) {
return _super.call(this, destination) || this;
}
MaterializeSubscriber.prototype._next = function (value) {
this.destination.next(Notification.createNext(value));
};
MaterializeSubscriber.prototype._error = function (err) {
var destination = this.destination;
destination.next(Notification.createError(err));
destination.complete();
};
MaterializeSubscriber.prototype._complete = function () {
var destination = this.destination;
destination.next(Notification.createComplete());
destination.complete();
};
return MaterializeSubscriber;
}(Subscriber));
//# sourceMappingURL=materialize.js.map