Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

toSubscriber.js 689B

123456789101112131415161718
  1. import { Subscriber } from '../Subscriber';
  2. import { rxSubscriber as rxSubscriberSymbol } from '../symbol/rxSubscriber';
  3. import { empty as emptyObserver } from '../Observer';
  4. export function toSubscriber(nextOrObserver, error, complete) {
  5. if (nextOrObserver) {
  6. if (nextOrObserver instanceof Subscriber) {
  7. return nextOrObserver;
  8. }
  9. if (nextOrObserver[rxSubscriberSymbol]) {
  10. return nextOrObserver[rxSubscriberSymbol]();
  11. }
  12. }
  13. if (!nextOrObserver && !error && !complete) {
  14. return new Subscriber(emptyObserver);
  15. }
  16. return new Subscriber(nextOrObserver, error, complete);
  17. }
  18. //# sourceMappingURL=toSubscriber.js.map