1 | import { Observer, PartialObserver } from './types';
|
2 | import { Subscription } from './Subscription';
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | export declare class Subscriber<T> extends Subscription implements Observer<T> {
|
14 | |
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | static create<T>(next?: (x?: T) => void, error?: (e?: any) => void, complete?: () => void): Subscriber<T>;
|
27 | /** @internal */ syncErrorValue: any;
|
28 | /** @internal */ syncErrorThrown: boolean;
|
29 | /** @internal */ syncErrorThrowable: boolean;
|
30 | protected isStopped: boolean;
|
31 | protected destination: PartialObserver<any> | Subscriber<any>;
|
32 | /**
|
33 | * @param {Observer|function(value: T): void} [destinationOrNext] A partially
|
34 | * defined Observer or a `next` callback function.
|
35 | * @param {function(e: ?any): void} [error] The `error` callback of an
|
36 | * Observer.
|
37 | * @param {function(): void} [complete] The `complete` callback of an
|
38 | * Observer.
|
39 | */
|
40 | constructor(destinationOrNext?: PartialObserver<any> | ((value: T) => void), error?: (e?: any) => void, complete?: () => void);
|
41 | /**
|
42 | * The {@link Observer} callback to receive notifications of type `next` from
|
43 | * the Observable, with a value. The Observable may call this method 0 or more
|
44 | * times.
|
45 | * @param {T} [value] The `next` value.
|
46 | * @return {void}
|
47 | */
|
48 | next(value?: T): void;
|
49 | /**
|
50 | * The {@link Observer} callback to receive notifications of type `error` from
|
51 | * the Observable, with an attached `Error`. Notifies the Observer that
|
52 | * the Observable has experienced an error condition.
|
53 | * @param {any} [err] The `error` exception.
|
54 | * @return {void}
|
55 | */
|
56 | error(err?: any): void;
|
57 | /**
|
58 | * The {@link Observer} callback to receive a valueless notification of type
|
59 | * `complete` from the Observable. Notifies the Observer that the Observable
|
60 | * has finished sending push-based notifications.
|
61 | * @return {void}
|
62 | */
|
63 | complete(): void;
|
64 | unsubscribe(): void;
|
65 | protected _next(value: T): void;
|
66 | protected _error(err: any): void;
|
67 | protected _complete(): void;
|
68 | /** @deprecated This is an internal implementation detail, do not use. */
|
69 | _unsubscribeAndRecycle(): Subscriber<T>;
|
70 | }
|
71 | /**
|
72 | * We need this JSDoc comment for affecting ESDoc.
|
73 | * @ignore
|
74 | * @extends {Ignored}
|
75 | */
|
76 | export declare class SafeSubscriber<T> extends Subscriber<T> {
|
77 | private _parentSubscriber;
|
78 | private _context;
|
79 | constructor(_parentSubscriber: Subscriber<T>, observerOrNext?: PartialObserver<T> | ((value: T) => void), error?: (e?: any) => void, complete?: () => void);
|
80 | next(value?: T): void;
|
81 | error(err?: any): void;
|
82 | complete(): void;
|
83 | private __tryOrUnsub;
|
84 | private __tryOrSetError;
|
85 | /** @internal This is an internal implementation detail, do not use. */
|
86 | _unsubscribe(): void;
|
87 | }
|
88 |
|
\ | No newline at end of file |