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 776B

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