frontend/.pnpm-store/v3/files/48/c3fe3e70cc6e697eef9896f3d9d7df09fb18a5c7429a60e8bb8e0737357e86f253e6eccce13bd467d48c86695708c02084474d8d31423d6508d4ca3aba16ea

38 lines
1.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { OperatorFunction } from '../types';
/**
* Ignores all items emitted by the source Observable and only passes calls of `complete` or `error`.
*
* ![](ignoreElements.png)
*
* The `ignoreElements` operator suppresses all items emitted by the source Observable,
* but allows its termination notification (either `error` or `complete`) to pass through unchanged.
*
* If you do not care about the items being emitted by an Observable, but you do want to be notified
* when it completes or when it terminates with an error, you can apply the `ignoreElements` operator
* to the Observable, which will ensure that it will never call its observers `next` handlers.
*
* ## Example
*
* Ignore all `next` emissions from the source
*
* ```ts
* import { of, ignoreElements } from 'rxjs';
*
* of('you', 'talking', 'to', 'me')
* .pipe(ignoreElements())
* .subscribe({
* next: word => console.log(word),
* error: err => console.log('error:', err),
* complete: () => console.log('the end'),
* });
*
* // result:
* // 'the end'
* ```
*
* @return A function that returns an empty Observable that only calls
* `complete` or `error`, based on which one is called by the source
* Observable.
*/
export declare function ignoreElements(): OperatorFunction<unknown, never>;
//# sourceMappingURL=ignoreElements.d.ts.map