observeOn.js 625 B

123456789
  1. import { executeSchedule } from '../util/executeSchedule';
  2. import { operate } from '../util/lift';
  3. import { createOperatorSubscriber } from './OperatorSubscriber';
  4. export function observeOn(scheduler, delay = 0) {
  5. return operate((source, subscriber) => {
  6. source.subscribe(createOperatorSubscriber(subscriber, (value) => executeSchedule(subscriber, scheduler, () => subscriber.next(value), delay), () => executeSchedule(subscriber, scheduler, () => subscriber.complete(), delay), (err) => executeSchedule(subscriber, scheduler, () => subscriber.error(err), delay)));
  7. });
  8. }
  9. //# sourceMappingURL=observeOn.js.map