Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
858 bytes
|
Line | |
---|
1 | import { OperatorFunction } from '../types';
|
---|
2 | /**
|
---|
3 | * Ignores all items emitted by the source Observable and only passes calls of `complete` or `error`.
|
---|
4 | *
|
---|
5 | * ![](ignoreElements.png)
|
---|
6 | *
|
---|
7 | * ## Examples
|
---|
8 | * ### Ignores emitted values, reacts to observable's completion.
|
---|
9 | * ```ts
|
---|
10 | * import { of } from 'rxjs';
|
---|
11 | * import { ignoreElements } from 'rxjs/operators';
|
---|
12 | *
|
---|
13 | * of('you', 'talking', 'to', 'me').pipe(
|
---|
14 | * ignoreElements(),
|
---|
15 | * )
|
---|
16 | * .subscribe(
|
---|
17 | * word => console.log(word),
|
---|
18 | * err => console.log('error:', err),
|
---|
19 | * () => console.log('the end'),
|
---|
20 | * );
|
---|
21 | * // result:
|
---|
22 | * // 'the end'
|
---|
23 | * ```
|
---|
24 | * @return {Observable} An empty Observable that only calls `complete`
|
---|
25 | * or `error`, based on which one is called by the source Observable.
|
---|
26 | * @method ignoreElements
|
---|
27 | * @owner Observable
|
---|
28 | */
|
---|
29 | export declare function ignoreElements(): OperatorFunction<any, never>;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.