UNPKG

3.29 kBTypeScriptView Raw
1/// <reference types="rx-lite" />
2
3declare namespace Rx {
4 interface Observable<T> {
5 delaySubscription(dueTime: number, scheduler?: IScheduler): Observable<T>;
6 delayWithSelector(delayDurationSelector: (item: T) => number): Observable<T>;
7 delayWithSelector(subscriptionDelay: number, delayDurationSelector: (item: T) => number): Observable<T>;
8
9 timeoutWithSelector<TTimeout>(
10 firstTimeout: Observable<TTimeout>,
11 timeoutdurationSelector?: (item: T) => Observable<TTimeout>,
12 other?: Observable<T>,
13 ): Observable<T>;
14
15 debounceWithSelector<TTimeout>(debounceDurationSelector: (item: T) => Observable<TTimeout>): Observable<T>;
16 /**
17 * @deprecated use #debounceWithSelector instead.
18 */
19 throttleWithSelector<TTimeout>(debounceDurationSelector: (item: T) => Observable<TTimeout>): Observable<T>;
20
21 skipLastWithTime(duration: number, scheduler?: IScheduler): Observable<T>;
22 takeLastWithTime(duration: number, timerScheduler?: IScheduler, loopScheduler?: IScheduler): Observable<T>;
23
24 takeLastBufferWithTime(duration: number, scheduler?: IScheduler): Observable<T[]>;
25 takeWithTime(duration: number, scheduler?: IScheduler): Observable<T>;
26 skipWithTime(duration: number, scheduler?: IScheduler): Observable<T>;
27
28 skipUntilWithTime(startTime: Date, scheduler?: IScheduler): Observable<T>;
29 skipUntilWithTime(duration: number, scheduler?: IScheduler): Observable<T>;
30 takeUntilWithTime(endTime: Date, scheduler?: IScheduler): Observable<T>;
31 takeUntilWithTime(duration: number, scheduler?: IScheduler): Observable<T>;
32
33 windowWithTime(timeSpan: number, timeShift: number, scheduler?: IScheduler): Observable<Observable<T>>;
34 windowWithTime(timeSpan: number, scheduler?: IScheduler): Observable<Observable<T>>;
35 windowWithTimeOrCount(timeSpan: number, count: number, scheduler?: IScheduler): Observable<Observable<T>>;
36 bufferWithTime(timeSpan: number, timeShift: number, scheduler?: IScheduler): Observable<T[]>;
37 bufferWithTime(timeSpan: number, scheduler?: IScheduler): Observable<T[]>;
38 bufferWithTimeOrCount(timeSpan: number, count: number, scheduler?: IScheduler): Observable<T[]>;
39 }
40
41 interface ObservableStatic {
42 timer(dueTime: Date, period: number, scheduler?: IScheduler): Observable<number>;
43 timer(dueTime: Date, scheduler?: IScheduler): Observable<number>;
44
45 generateWithRelativeTime<TState, TResult>(
46 initialState: TState,
47 condition: (state: TState) => boolean,
48 iterate: (state: TState) => TState,
49 resultSelector: (state: TState) => TResult,
50 timeSelector: (state: TState) => number,
51 scheduler?: IScheduler,
52 ): Observable<TResult>;
53 generateWithAbsoluteTime<TState, TResult>(
54 initialState: TState,
55 condition: (state: TState) => boolean,
56 iterate: (state: TState) => TState,
57 resultSelector: (state: TState) => TResult,
58 timeSelector: (state: TState) => Date,
59 scheduler?: IScheduler,
60 ): Observable<TResult>;
61 }
62}
63
64declare module "rx-lite-time" {
65 export = Rx;
66}
67
\No newline at end of file