Home Manual Reference Source Test Repository

es6/operator/ignoreElements.js

import { Subscriber } from '../Subscriber';
import { noop } from '../util/noop';
/**
 * 忽略源 Observable 所发送的所有项,只传递 `complete` 或 `error` 的调用。
 *
 * <img src="./img/ignoreElements.png" width="100%">
 *
 * @return {Observable} 该 Observable 是空的,只调用 `complete` 或
 * `error`,调用是基于源 Observable 的调用。
 * @method ignoreElements
 * @owner Observable
 */
export function ignoreElements() {
    return this.lift(new IgnoreElementsOperator());
}
;
class IgnoreElementsOperator {
    call(subscriber, source) {
        return source.subscribe(new IgnoreElementsSubscriber(subscriber));
    }
}
/**
 * We need this JSDoc comment for affecting ESDoc.
 * @ignore
 * @extends {Ignored}
 */
class IgnoreElementsSubscriber extends Subscriber {
    _next(unused) {
        noop();
    }
}
//# sourceMappingURL=ignoreElements.js.map