1 | import { Operator } from './Operator';
|
2 | import { Subscriber } from './Subscriber';
|
3 | import { Subscription } from './Subscription';
|
4 | import { TeardownLogic, OperatorFunction, PartialObserver, Subscribable } from './types';
|
5 | import { iif } from './observable/iif';
|
6 | import { throwError } from './observable/throwError';
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | export declare class Observable<T> implements Subscribable<T> {
|
14 |
|
15 | _isScalar: boolean;
|
16 |
|
17 | source: Observable<any>;
|
18 |
|
19 | operator: Operator<any, T>;
|
20 | |
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | constructor(subscribe?: (this: Observable<T>, subscriber: Subscriber<T>) => TeardownLogic);
|
28 | /**
|
29 | * Creates a new cold Observable by calling the Observable constructor
|
30 | * @static true
|
31 | * @owner Observable
|
32 | * @method create
|
33 | * @param {Function} subscribe? the subscriber function to be passed to the Observable constructor
|
34 | * @return {Observable} a new cold observable
|
35 | * @nocollapse
|
36 | * @deprecated use new Observable() instead
|
37 | */
|
38 | static create: Function;
|
39 | /**
|
40 | * Creates a new Observable, with this Observable as the source, and the passed
|
41 | * operator defined as the new observable's operator.
|
42 | * @method lift
|
43 | * @param {Operator} operator the operator defining the operation to take on the observable
|
44 | * @return {Observable} a new observable with the Operator applied
|
45 | */
|
46 | lift<R>(operator: Operator<T, R>): Observable<R>;
|
47 | subscribe(observer?: PartialObserver<T>): Subscription;
|
48 |
|
49 | subscribe(next: null | undefined, error: null | undefined, complete: () => void): Subscription;
|
50 |
|
51 | subscribe(next: null | undefined, error: (error: any) => void, complete?: () => void): Subscription;
|
52 |
|
53 | subscribe(next: (value: T) => void, error: null | undefined, complete: () => void): Subscription;
|
54 | subscribe(next?: (value: T) => void, error?: (error: any) => void, complete?: () => void): Subscription;
|
55 |
|
56 | _trySubscribe(sink: Subscriber<T>): TeardownLogic;
|
57 | |
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 | forEach(next: (value: T) => void, promiseCtor?: PromiseConstructorLike): Promise<void>;
|
65 |
|
66 | _subscribe(subscriber: Subscriber<any>): TeardownLogic;
|
67 | |
68 |
|
69 |
|
70 |
|
71 | static if: typeof iif;
|
72 | |
73 |
|
74 |
|
75 |
|
76 | static throw: typeof throwError;
|
77 | pipe(): Observable<T>;
|
78 | pipe<A>(op1: OperatorFunction<T, A>): Observable<A>;
|
79 | pipe<A, B>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>): Observable<B>;
|
80 | pipe<A, B, C>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>): Observable<C>;
|
81 | pipe<A, B, C, D>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>): Observable<D>;
|
82 | pipe<A, B, C, D, E>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>, op5: OperatorFunction<D, E>): Observable<E>;
|
83 | pipe<A, B, C, D, E, F>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>, op5: OperatorFunction<D, E>, op6: OperatorFunction<E, F>): Observable<F>;
|
84 | pipe<A, B, C, D, E, F, G>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>, op5: OperatorFunction<D, E>, op6: OperatorFunction<E, F>, op7: OperatorFunction<F, G>): Observable<G>;
|
85 | pipe<A, B, C, D, E, F, G, H>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>, op5: OperatorFunction<D, E>, op6: OperatorFunction<E, F>, op7: OperatorFunction<F, G>, op8: OperatorFunction<G, H>): Observable<H>;
|
86 | pipe<A, B, C, D, E, F, G, H, I>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>, op5: OperatorFunction<D, E>, op6: OperatorFunction<E, F>, op7: OperatorFunction<F, G>, op8: OperatorFunction<G, H>, op9: OperatorFunction<H, I>): Observable<I>;
|
87 | pipe<A, B, C, D, E, F, G, H, I>(op1: OperatorFunction<T, A>, op2: OperatorFunction<A, B>, op3: OperatorFunction<B, C>, op4: OperatorFunction<C, D>, op5: OperatorFunction<D, E>, op6: OperatorFunction<E, F>, op7: OperatorFunction<F, G>, op8: OperatorFunction<G, H>, op9: OperatorFunction<H, I>, ...operations: OperatorFunction<any, any>[]): Observable<{}>;
|
88 | toPromise<T>(this: Observable<T>): Promise<T>;
|
89 | toPromise<T>(this: Observable<T>, PromiseCtor: typeof Promise): Promise<T>;
|
90 | toPromise<T>(this: Observable<T>, PromiseCtor: PromiseConstructorLike): Promise<T>;
|
91 | }
|