throwError.js 571 B

123456789101112131415
  1. /** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */
  2. import { Observable } from '../Observable';
  3. export function throwError(error, scheduler) {
  4. if (!scheduler) {
  5. return new Observable(function (subscriber) { return subscriber.error(error); });
  6. }
  7. else {
  8. return new Observable(function (subscriber) { return scheduler.schedule(dispatch, 0, { error: error, subscriber: subscriber }); });
  9. }
  10. }
  11. function dispatch(_a) {
  12. var error = _a.error, subscriber = _a.subscriber;
  13. subscriber.error(error);
  14. }
  15. //# sourceMappingURL=throwError.js.map