1 import { Observable } from '../Observable';
2 import { SchedulerLike } from '../types';
4 * The same Observable instance returned by any call to {@link empty} without a
5 * `scheduler`. It is preferrable to use this over `empty()`.
7 export declare const EMPTY: Observable<never>;
9 * Creates an Observable that emits no items to the Observer and immediately
10 * emits a complete notification.
12 * <span class="informal">Just emits 'complete', and nothing else.
17 * This static operator is useful for creating a simple Observable that only
18 * emits the complete notification. It can be used for composing with other
19 * Observables, such as in a {@link mergeMap}.
22 * ### Emit the number 7, then complete
24 * import { empty } from 'rxjs';
25 * import { startWith } from 'rxjs/operators';
27 * const result = empty().pipe(startWith(7));
28 * result.subscribe(x => console.log(x));
31 * ### Map and flatten only odd numbers to the sequence 'a', 'b', 'c'
33 * import { empty, interval, of } from 'rxjs';
34 * import { mergeMap } from 'rxjs/operators';
36 * const interval$ = interval(1000);
37 * const result = interval$.pipe(
38 * mergeMap(x => x % 2 === 1 ? of('a', 'b', 'c') : empty()),
40 * result.subscribe(x => console.log(x));
42 * // Results in the following to the console:
43 * // x is equal to the count on the interval eg(0,1,2,3,...)
44 * // x will occur every 1000ms
45 * // if x % 2 is equal to 1 print abc
46 * // if x % 2 is not equal to 1 nothing will be output
49 * @see {@link Observable}
52 * @see {@link throwError}
54 * @param scheduler A {@link SchedulerLike} to use for scheduling
55 * the emission of the complete notification.
56 * @return An "empty" Observable: emits only the complete
58 * @deprecated Deprecated in favor of using {@link EMPTY} constant, or {@link scheduled} (e.g. `scheduled([], scheduler)`)
60 export declare function empty(scheduler?: SchedulerLike): Observable<never>;