1 import { Observable } from '../Observable';
2 import { MonoTypeOperatorFunction } from '../types';
4 * Emits the values emitted by the source Observable until a `notifier`
5 * Observable emits a value.
7 * <span class="informal">Lets values pass until a second Observable,
8 * `notifier`, emits a value. Then, it completes.</span>
12 * `takeUntil` subscribes and begins mirroring the source Observable. It also
13 * monitors a second Observable, `notifier` that you provide. If the `notifier`
14 * emits a value, the output Observable stops mirroring the source Observable
15 * and completes. If the `notifier` doesn't emit any value and completes
16 * then `takeUntil` will pass all values.
19 * Tick every second until the first click happens
21 * import { fromEvent, interval } from 'rxjs';
22 * import { takeUntil } from 'rxjs/operators';
24 * const source = interval(1000);
25 * const clicks = fromEvent(document, 'click');
26 * const result = source.pipe(takeUntil(clicks));
27 * result.subscribe(x => console.log(x));
31 * @see {@link takeLast}
32 * @see {@link takeWhile}
35 * @param {Observable} notifier The Observable whose first emitted value will
36 * cause the output Observable of `takeUntil` to stop emitting values from the
38 * @return {Observable<T>} An Observable that emits the values from the source
39 * Observable until such time as `notifier` emits its first value.
43 export declare function takeUntil<T>(notifier: Observable<any>): MonoTypeOperatorFunction<T>;