Add production dependencies
This commit is contained in:
parent
5a0114f3e2
commit
579ccdc29f
12113 changed files with 978046 additions and 3 deletions
33
node_modules/rxjs/_esm2015/internal/operators/retry.js
generated
vendored
Normal file
33
node_modules/rxjs/_esm2015/internal/operators/retry.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
import { Subscriber } from '../Subscriber';
|
||||
export function retry(count = -1) {
|
||||
return (source) => source.lift(new RetryOperator(count, source));
|
||||
}
|
||||
class RetryOperator {
|
||||
constructor(count, source) {
|
||||
this.count = count;
|
||||
this.source = source;
|
||||
}
|
||||
call(subscriber, source) {
|
||||
return source.subscribe(new RetrySubscriber(subscriber, this.count, this.source));
|
||||
}
|
||||
}
|
||||
class RetrySubscriber extends Subscriber {
|
||||
constructor(destination, count, source) {
|
||||
super(destination);
|
||||
this.count = count;
|
||||
this.source = source;
|
||||
}
|
||||
error(err) {
|
||||
if (!this.isStopped) {
|
||||
const { source, count } = this;
|
||||
if (count === 0) {
|
||||
return super.error(err);
|
||||
}
|
||||
else if (count > -1) {
|
||||
this.count = count - 1;
|
||||
}
|
||||
source.subscribe(this._unsubscribeAndRecycle());
|
||||
}
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=retry.js.map
|
Loading…
Add table
Add a link
Reference in a new issue