1 |
|
2 |
|
3 | declare namespace Rx {
|
4 | interface Observable<T> {
|
5 | join<TRight, TDurationLeft, TDurationRight, TResult>(
|
6 | right: Observable<TRight>,
|
7 | leftDurationSelector: (leftItem: T) => Observable<TDurationLeft>,
|
8 | rightDurationSelector: (rightItem: TRight) => Observable<TDurationRight>,
|
9 | resultSelector: (leftItem: T, rightItem: TRight) => TResult,
|
10 | ): Observable<TResult>;
|
11 |
|
12 | groupJoin<TRight, TDurationLeft, TDurationRight, TResult>(
|
13 | right: Observable<TRight>,
|
14 | leftDurationSelector: (leftItem: T) => Observable<TDurationLeft>,
|
15 | rightDurationSelector: (rightItem: TRight) => Observable<TDurationRight>,
|
16 | resultSelector: (leftItem: T, rightItem: Observable<TRight>) => TResult,
|
17 | ): Observable<TResult>;
|
18 |
|
19 | window<TWindowOpening>(windowOpenings: Observable<TWindowOpening>): Observable<Observable<T>>;
|
20 | window<TWindowClosing>(windowClosingSelector: () => Observable<TWindowClosing>): Observable<Observable<T>>;
|
21 | window<TWindowOpening, TWindowClosing>(
|
22 | windowOpenings: Observable<TWindowOpening>,
|
23 | windowClosingSelector: () => Observable<TWindowClosing>,
|
24 | ): Observable<Observable<T>>;
|
25 |
|
26 | buffer<TBufferOpening>(bufferOpenings: Observable<TBufferOpening>): Observable<T[]>;
|
27 | buffer<TBufferClosing>(bufferClosingSelector: () => Observable<TBufferClosing>): Observable<T[]>;
|
28 | buffer<TBufferOpening, TBufferClosing>(
|
29 | bufferOpenings: Observable<TBufferOpening>,
|
30 | bufferClosingSelector: () => Observable<TBufferClosing>,
|
31 | ): Observable<T[]>;
|
32 |
|
33 | /**
|
34 | * Returns a new observable that triggers on the second and subsequent triggerings of the input observable.
|
35 | * The Nth triggering of the input observable passes the arguments from the N-1th and Nth triggering as a pair.
|
36 | * The argument passed to the N-1th triggering is held in hidden internal state until the Nth triggering occurs.
|
37 | * @returns An observable that triggers on successive pairs of observations from the input observable as an array.
|
38 | */
|
39 | pairwise(): Observable<T[]>;
|
40 |
|
41 | /**
|
42 | * Returns two observables which partition the observations of the source by the given function.
|
43 | * The first will trigger observations for those values for which the predicate returns true.
|
44 | * The second will trigger observations for those values where the predicate returns false.
|
45 | * The predicate is executed once for each subscribed observer.
|
46 | * Both also propagate all error observations arising from the source and each completes
|
47 | * when the source completes.
|
48 | * @param predicate
|
49 | * The function to determine which output Observable will trigger a particular observation.
|
50 | * @returns
|
51 | * An array of observables. The first triggers when the predicate returns true,
|
52 | * and the second triggers when the predicate returns false.
|
53 | */
|
54 | partition(
|
55 | predicate: (value: T, index: number, source: Observable<T>) => boolean,
|
56 | thisArg?: any,
|
57 | ): Array<Observable<T>>;
|
58 | }
|
59 | }
|
60 |
|
61 | declare module "rx-lite-coincidence" {
|
62 | export = Rx;
|
63 | }
|
64 |
|
\ | No newline at end of file |