1 import { OperatorFunction } from '../types';
3 * Emits the given constant value on the output Observable every time the source
4 * Observable emits a value.
6 * <span class="informal">Like {@link map}, but it maps every source value to
7 * the same output value every time.</span>
11 * Takes a constant `value` as argument, and emits that whenever the source
12 * Observable emits a value. In other words, ignores the actual source value,
13 * and simply uses the emission moment to know when to emit the given `value`.
16 * Map every click to the string 'Hi'
18 * import { fromEvent } from 'rxjs';
19 * import { mapTo } from 'rxjs/operators';
21 * const clicks = fromEvent(document, 'click');
22 * const greetings = clicks.pipe(mapTo('Hi'));
23 * greetings.subscribe(x => console.log(x));
28 * @param {any} value The value to map each source value to.
29 * @return {Observable} An Observable that emits the given `value` every time
30 * the source Observable emits something.
34 export declare function mapTo<T, R>(value: R): OperatorFunction<T, R>;