forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rx.joinpatterns.d.ts
60 lines (53 loc) · 2.31 KB
/
rx.joinpatterns.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// Type definitions for RxJS-Join v2.2.28
// Project: http://rx.codeplex.com/
// Definitions by: Igor Oleinikov <https://github.com/Igorbek>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
///<reference path="rx.d.ts" />
declare namespace Rx {
interface Pattern1<T1> {
and<T2>(other: Observable<T2>): Pattern2<T1, T2>;
thenDo<TR>(selector: (item1: T1) => TR): Plan<TR>;
}
interface Pattern2<T1, T2> {
and<T3>(other: Observable<T3>): Pattern3<T1, T2, T3>;
thenDo<TR>(selector: (item1: T1, item2: T2) => TR): Plan<TR>;
}
interface Pattern3<T1, T2, T3> {
and<T4>(other: Observable<T4>): Pattern4<T1, T2, T3, T4>;
thenDo<TR>(selector: (item1: T1, item2: T2, item3: T3) => TR): Plan<TR>;
}
interface Pattern4<T1, T2, T3, T4> {
and<T5>(other: Observable<T5>): Pattern5<T1, T2, T3, T4, T5>;
thenDo<TR>(selector: (item1: T1, item2: T2, item3: T3, item4: T4) => TR): Plan<TR>;
}
interface Pattern5<T1, T2, T3, T4, T5> {
and<T6>(other: Observable<T6>): Pattern6<T1, T2, T3, T4, T5, T6>;
thenDo<TR>(selector: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5) => TR): Plan<TR>;
}
interface Pattern6<T1, T2, T3, T4, T5, T6> {
and<T7>(other: Observable<T7>): Pattern7<T1, T2, T3, T4, T5, T6, T7>;
thenDo<TR>(selector: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5, item6: T6) => TR): Plan<TR>;
}
interface Pattern7<T1, T2, T3, T4, T5, T6, T7> {
and<T8>(other: Observable<T8>): Pattern8<T1, T2, T3, T4, T5, T6, T7, T8>;
thenDo<TR>(selector: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5, item6: T6, item7: T7) => TR): Plan<TR>;
}
interface Pattern8<T1, T2, T3, T4, T5, T6, T7, T8> {
and<T9>(other: Observable<T9>): Pattern9<T1, T2, T3, T4, T5, T6, T7, T8, T9>;
thenDo<TR>(selector: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5, item6: T6, item7: T7, item8: T8) => TR): Plan<TR>;
}
interface Pattern9<T1, T2, T3, T4, T5, T6, T7, T8, T9> {
thenDo<TR>(selector: (item1: T1, item2: T2, item3: T3, item4: T4, item5: T5, item6: T6, item7: T7, item8: T8, item9: T9) => TR): Plan<TR>;
}
interface Plan<T> { }
interface Observable<T> {
and<T2>(other: Observable<T2>): Pattern2<T, T2>;
thenDo<TR>(selector: (item1: T) => TR): Plan<TR>;
}
interface ObservableStatic {
when<TR>(plan: Plan<TR>): Observable<TR>;
}
}
declare module "rx.joinpatterns" {
export = Rx;
}