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.

123456789101112131415161718
  1. import { Observable } from '../Observable';
  2. import { from } from './from';
  3. import { empty } from './empty';
  4. export function defer(observableFactory) {
  5. return new Observable(subscriber => {
  6. let input;
  7. try {
  8. input = observableFactory();
  9. }
  10. catch (err) {
  11. subscriber.error(err);
  12. return undefined;
  13. }
  14. const source = input ? from(input) : empty();
  15. return source.subscribe(subscriber);
  16. });
  17. }
  18. //# sourceMappingURL=defer.js.map