materialize.js 659 B

1234567891011121314151617
  1. import { Notification } from '../Notification';
  2. import { operate } from '../util/lift';
  3. import { createOperatorSubscriber } from './OperatorSubscriber';
  4. export function materialize() {
  5. return operate((source, subscriber) => {
  6. source.subscribe(createOperatorSubscriber(subscriber, (value) => {
  7. subscriber.next(Notification.createNext(value));
  8. }, () => {
  9. subscriber.next(Notification.createComplete());
  10. subscriber.complete();
  11. }, (err) => {
  12. subscriber.next(Notification.createError(err));
  13. subscriber.complete();
  14. }));
  15. });
  16. }
  17. //# sourceMappingURL=materialize.js.map