123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- import { Observer, PartialObserver } from './types';
- import { Subscription } from './Subscription';
- export declare class Subscriber<T> extends Subscription implements Observer<T> {
-
- static create<T>(next?: (x?: T) => void, error?: (e?: any) => void, complete?: () => void): Subscriber<T>;
- syncErrorValue: any;
- syncErrorThrown: boolean;
- syncErrorThrowable: boolean;
- protected isStopped: boolean;
- protected destination: PartialObserver<any> | Subscriber<any>;
-
- 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;
- }
|