Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / rxjs / _esm2015 / internal / operators / skipUntil.js
1 import { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';
2 export function skipUntil(notifier) {
3     return (source) => source.lift(new SkipUntilOperator(notifier));
4 }
5 class SkipUntilOperator {
6     constructor(notifier) {
7         this.notifier = notifier;
8     }
9     call(destination, source) {
10         return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));
11     }
12 }
13 class SkipUntilSubscriber extends SimpleOuterSubscriber {
14     constructor(destination, notifier) {
15         super(destination);
16         this.hasValue = false;
17         const innerSubscriber = new SimpleInnerSubscriber(this);
18         this.add(innerSubscriber);
19         this.innerSubscription = innerSubscriber;
20         const innerSubscription = innerSubscribe(notifier, innerSubscriber);
21         if (innerSubscription !== innerSubscriber) {
22             this.add(innerSubscription);
23             this.innerSubscription = innerSubscription;
24         }
25     }
26     _next(value) {
27         if (this.hasValue) {
28             super._next(value);
29         }
30     }
31     notifyNext() {
32         this.hasValue = true;
33         if (this.innerSubscription) {
34             this.innerSubscription.unsubscribe();
35         }
36     }
37     notifyComplete() {
38     }
39 }
40 //# sourceMappingURL=skipUntil.js.map