import { Observer, PartialObserver } from './types'; import { Subscription } from './Subscription'; /** * Implements the {@link Observer} interface and extends the * {@link Subscription} class. While the {@link Observer} is the public API for * consuming the values of an {@link Observable}, all Observers get converted to * a Subscriber, in order to provide Subscription-like capabilities such as * `unsubscribe`. Subscriber is a common type in RxJS, and crucial for * implementing operators, but it is rarely used as a public API. * * @class Subscriber<T> */ export declare class Subscriber<T> extends Subscription implements Observer<T> { /** * A static factory for a Subscriber, given a (potentially partial) definition * of an Observer. * @param {function(x: ?T): void} [next] The `next` callback of an Observer. * @param {function(e: ?any): void} [error] The `error` callback of an * Observer. * @param {function(): void} [complete] The `complete` callback of an * Observer. * @return {Subscriber<T>} A Subscriber wrapping the (partially defined) * Observer represented by the given arguments. * @nocollapse */ static create<T>(next?: (x?: T) => void, error?: (e?: any) => void, complete?: () => void): Subscriber<T>; /** @internal */ syncErrorValue: any; /** @internal */ syncErrorThrown: boolean; /** @internal */ syncErrorThrowable: boolean; protected isStopped: boolean; protected destination: PartialObserver<any> | Subscriber<any>; /** * @param {Observer|function(value: T): void} [destinationOrNext] A partially * defined Observer or a `next` callback function. * @param {function(e: ?any): void} [error] The `error` callback of an * Observer. * @param {function(): void} [complete] The `complete` callback of an * Observer. */ constructor(destinationOrNext?: PartialObserver<any> | ((value: T) => void), error?: (e?: any) => void, complete?: () => void); /** * The {@link Observer} callback to receive notifications of type `next` from * the Observable, with a value. The Observable may call this method 0 or more * times. * @param {T} [value] The `next` value. * @return {void} */ next(value?: T): void; /** * The {@link Observer} callback to receive notifications of type `error` from * the Observable, with an attached `Error`. Notifies the Observer that * the Observable has experienced an error condition. * @param {any} [err] The `error` exception. * @return {void} */ error(err?: any): void; /** * The {@link Observer} callback to receive a valueless notification of type * `complete` from the Observable. Notifies the Observer that the Observable * has finished sending push-based notifications. * @return {void} */ complete(): void; unsubscribe(): void; protected _next(value: T): void; protected _error(err: any): void; protected _complete(): void; /** @deprecated This is an internal implementation detail, do not use. */ _unsubscribeAndRecycle(): Subscriber<T>; } /** * We need this JSDoc comment for affecting ESDoc. * @ignore * @extends {Ignored} */ export declare class SafeSubscriber<T> extends Subscriber<T> { private _parentSubscriber; private _context; constructor(_parentSubscriber: Subscriber<T>, observerOrNext?: PartialObserver<T> | ((value: T) => void), error?: (e?: any) => void, complete?: () => void); next(value?: T): void; error(err?: any): void; complete(): void; private __tryOrUnsub; private __tryOrSetError; /** @internal This is an internal implementation detail, do not use. */ _unsubscribe(): void; }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
observable | Folder | 0755 |
|
|
operators | Folder | 0755 |
|
|
scheduled | Folder | 0755 |
|
|
scheduler | Folder | 0755 |
|
|
symbol | Folder | 0755 |
|
|
testing | Folder | 0755 |
|
|
util | Folder | 0755 |
|
|
AsyncSubject.d.ts | File | 640 B | 0644 |
|
AsyncSubject.js | File | 2.17 KB | 0644 |
|
AsyncSubject.js.map | File | 1.11 KB | 0644 |
|
BehaviorSubject.d.ts | File | 597 B | 0644 |
|
BehaviorSubject.js | File | 2.01 KB | 0644 |
|
BehaviorSubject.js.map | File | 894 B | 0644 |
|
InnerSubscriber.d.ts | File | 532 B | 0644 |
|
InnerSubscriber.js | File | 1.59 KB | 0644 |
|
InnerSubscriber.js.map | File | 801 B | 0644 |
|
Notification.d.ts | File | 3.37 KB | 0644 |
|
Notification.js | File | 2.72 KB | 0644 |
|
Notification.js.map | File | 2.09 KB | 0644 |
|
Observable.d.ts | File | 5.93 KB | 0644 |
|
Observable.js | File | 3.96 KB | 0644 |
|
Observable.js.map | File | 2.98 KB | 0644 |
|
Observer.d.ts | File | 79 B | 0644 |
|
Observer.js | File | 523 B | 0644 |
|
Observer.js.map | File | 380 B | 0644 |
|
Operator.d.ts | File | 185 B | 0644 |
|
Operator.js | File | 113 B | 0644 |
|
Operator.js.map | File | 102 B | 0644 |
|
OuterSubscriber.d.ts | File | 509 B | 0644 |
|
OuterSubscriber.js | File | 1.41 KB | 0644 |
|
OuterSubscriber.js.map | File | 543 B | 0644 |
|
ReplaySubject.d.ts | File | 982 B | 0644 |
|
ReplaySubject.js | File | 4.84 KB | 0644 |
|
ReplaySubject.js.map | File | 3.4 KB | 0644 |
|
Rx.d.ts | File | 8.91 KB | 0644 |
|
Rx.js | File | 9.22 KB | 0644 |
|
Rx.js.map | File | 2.86 KB | 0644 |
|
Scheduler.d.ts | File | 2.4 KB | 0644 |
|
Scheduler.js | File | 633 B | 0644 |
|
Scheduler.js.map | File | 537 B | 0644 |
|
Subject.d.ts | File | 2.19 KB | 0644 |
|
Subject.js | File | 5.9 KB | 0644 |
|
Subject.js.map | File | 3.82 KB | 0644 |
|
SubjectSubscription.d.ts | File | 444 B | 0644 |
|
SubjectSubscription.js | File | 1.7 KB | 0644 |
|
SubjectSubscription.js.map | File | 863 B | 0644 |
|
Subscriber.d.ts | File | 3.67 KB | 0644 |
|
Subscriber.js | File | 9.04 KB | 0644 |
|
Subscriber.js.map | File | 5.86 KB | 0644 |
|
Subscription.d.ts | File | 2.72 KB | 0644 |
|
Subscription.js | File | 5.18 KB | 0644 |
|
Subscription.js.map | File | 3.75 KB | 0644 |
|
config.d.ts | File | 860 B | 0644 |
|
config.js | File | 846 B | 0644 |
|
config.js.map | File | 502 B | 0644 |
|
innerSubscribe.d.ts | File | 2.4 KB | 0644 |
|
innerSubscribe.js | File | 4.14 KB | 0644 |
|
innerSubscribe.js.map | File | 2.15 KB | 0644 |
|
types.d.ts | File | 3.17 KB | 0644 |
|
types.js | File | 110 B | 0644 |
|
types.js.map | File | 96 B | 0644 |
|