Add production dependencies
This commit is contained in:
parent
5a0114f3e2
commit
579ccdc29f
12113 changed files with 978046 additions and 3 deletions
50
node_modules/rxjs/_esm2015/internal/operators/observeOn.js
generated
vendored
Normal file
50
node_modules/rxjs/_esm2015/internal/operators/observeOn.js
generated
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
import { Subscriber } from '../Subscriber';
|
||||
import { Notification } from '../Notification';
|
||||
export function observeOn(scheduler, delay = 0) {
|
||||
return function observeOnOperatorFunction(source) {
|
||||
return source.lift(new ObserveOnOperator(scheduler, delay));
|
||||
};
|
||||
}
|
||||
export class ObserveOnOperator {
|
||||
constructor(scheduler, delay = 0) {
|
||||
this.scheduler = scheduler;
|
||||
this.delay = delay;
|
||||
}
|
||||
call(subscriber, source) {
|
||||
return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));
|
||||
}
|
||||
}
|
||||
export class ObserveOnSubscriber extends Subscriber {
|
||||
constructor(destination, scheduler, delay = 0) {
|
||||
super(destination);
|
||||
this.scheduler = scheduler;
|
||||
this.delay = delay;
|
||||
}
|
||||
static dispatch(arg) {
|
||||
const { notification, destination } = arg;
|
||||
notification.observe(destination);
|
||||
this.unsubscribe();
|
||||
}
|
||||
scheduleMessage(notification) {
|
||||
const destination = this.destination;
|
||||
destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));
|
||||
}
|
||||
_next(value) {
|
||||
this.scheduleMessage(Notification.createNext(value));
|
||||
}
|
||||
_error(err) {
|
||||
this.scheduleMessage(Notification.createError(err));
|
||||
this.unsubscribe();
|
||||
}
|
||||
_complete() {
|
||||
this.scheduleMessage(Notification.createComplete());
|
||||
this.unsubscribe();
|
||||
}
|
||||
}
|
||||
export class ObserveOnMessage {
|
||||
constructor(notification, destination) {
|
||||
this.notification = notification;
|
||||
this.destination = destination;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=observeOn.js.map
|
Loading…
Add table
Add a link
Reference in a new issue