materialize.js 683 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(function (source, subscriber) {
  6. source.subscribe(createOperatorSubscriber(subscriber, function (value) {
  7. subscriber.next(Notification.createNext(value));
  8. }, function () {
  9. subscriber.next(Notification.createComplete());
  10. subscriber.complete();
  11. }, function (err) {
  12. subscriber.next(Notification.createError(err));
  13. subscriber.complete();
  14. }));
  15. });
  16. }
  17. //# sourceMappingURL=materialize.js.map