1 import { OperatorFunction } from '../types';
3 * Emits false if the input observable emits any values, or emits true if the
4 * input observable completes without emitting any values.
6 * <span class="informal">Tells whether any values are emitted by an observable</span>
10 * `isEmpty` transforms an Observable that emits values into an Observable that
11 * emits a single boolean value representing whether or not any values were
12 * emitted by the source Observable. As soon as the source Observable emits a
13 * value, `isEmpty` will emit a `false` and complete. If the source Observable
14 * completes having not emitted anything, `isEmpty` will emit a `true` and
17 * A similar effect could be achieved with {@link count}, but `isEmpty` can emit
18 * a `false` value sooner.
22 * Emit `false` for a non-empty Observable
24 * import { Subject } from 'rxjs';
25 * import { isEmpty } from 'rxjs/operators';
27 * const source = new Subject<string>();
28 * const result = source.pipe(isEmpty());
29 * source.subscribe(x => console.log(x));
30 * result.subscribe(x => console.log(x));
43 * Emit `true` for an empty Observable
45 * import { EMPTY } from 'rxjs';
46 * import { isEmpty } from 'rxjs/operators';
48 * const result = EMPTY.pipe(isEmpty());
49 * result.subscribe(x => console.log(x));
57 * @return {OperatorFunction<T, boolean>} An Observable of a boolean value indicating whether observable was empty or not
61 export declare function isEmpty<T>(): OperatorFunction<T, boolean>;