wishthis/node_modules/rxjs/_esm2015/internal/operators/materialize.js
2022-05-29 11:24:36 +02:00

31 lines
No EOL
946 B
JavaScript

import { Subscriber } from '../Subscriber';
import { Notification } from '../Notification';
export function materialize() {
return function materializeOperatorFunction(source) {
return source.lift(new MaterializeOperator());
};
}
class MaterializeOperator {
call(subscriber, source) {
return source.subscribe(new MaterializeSubscriber(subscriber));
}
}
class MaterializeSubscriber extends Subscriber {
constructor(destination) {
super(destination);
}
_next(value) {
this.destination.next(Notification.createNext(value));
}
_error(err) {
const destination = this.destination;
destination.next(Notification.createError(err));
destination.complete();
}
_complete() {
const destination = this.destination;
destination.next(Notification.createComplete());
destination.complete();
}
}
//# sourceMappingURL=materialize.js.map