1 | import { Observer } 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 |
|
27 |
|
28 |
|
29 | static create<T>(next?: (x?: T) => void, error?: (e?: any) => void, complete?: () => void): Subscriber<T>;
|
30 | /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */
|
31 | protected isStopped: boolean;
|
32 | /** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */
|
33 | protected destination: Subscriber<any> | Observer<any>;
|
34 | /**
|
35 | * @deprecated Internal implementation detail, do not use directly. Will be made internal in v8.
|
36 | * There is no reason to directly create an instance of Subscriber. This type is exported for typings reasons.
|
37 | */
|
38 | constructor(destination?: Subscriber<any> | Observer<any>);
|
39 | /**
|
40 | * The {@link Observer} callback to receive notifications of type `next` from
|
41 | * the Observable, with a value. The Observable may call this method 0 or more
|
42 | * times.
|
43 | * @param {T} [value] The `next` value.
|
44 | * @return {void}
|
45 | */
|
46 | next(value?: T): void;
|
47 | /**
|
48 | * The {@link Observer} callback to receive notifications of type `error` from
|
49 | * the Observable, with an attached `Error`. Notifies the Observer that
|
50 | * the Observable has experienced an error condition.
|
51 | * @param {any} [err] The `error` exception.
|
52 | * @return {void}
|
53 | */
|
54 | error(err?: any): void;
|
55 | /**
|
56 | * The {@link Observer} callback to receive a valueless notification of type
|
57 | * `complete` from the Observable. Notifies the Observer that the Observable
|
58 | * has finished sending push-based notifications.
|
59 | * @return {void}
|
60 | */
|
61 | complete(): void;
|
62 | unsubscribe(): void;
|
63 | protected _next(value: T): void;
|
64 | protected _error(err: any): void;
|
65 | protected _complete(): void;
|
66 | }
|
67 | export declare class SafeSubscriber<T> extends Subscriber<T> {
|
68 | constructor(observerOrNext?: Partial<Observer<T>> | ((value: T) => void) | null, error?: ((e?: any) => void) | null, complete?: (() => void) | null);
|
69 | }
|
70 | /**
|
71 | * The observer used as a stub for subscriptions where the user did not
|
72 | * pass any arguments to `subscribe`. Comes with the default error handling
|
73 | * behavior.
|
74 | */
|
75 | export declare const EMPTY_OBSERVER: Readonly<Observer<any>> & {
|
76 | closed: true;
|
77 | };
|
78 | //# sourceMappingURL=Subscriber.d.ts.map |
\ | No newline at end of file |