forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rx.virtualtime.d.ts
41 lines (32 loc) · 1.65 KB
/
rx.virtualtime.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
// Type definitions for RxJS-VirtualTime v2.2.28
// Project: http://rx.codeplex.com/
// Definitions by: gsino <http://www.codeplex.com/site/users/view/gsino>, Igor Oleinikov <https://github.com/Igorbek>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///<reference path="rx.d.ts" />
declare module Rx {
export interface VirtualTimeScheduler<TAbsolute, TRelative> extends Scheduler {
//protected constructor(initialClock: TAbsolute, comparer: (first: TAbsolute, second: TAbsolute) => number);
advanceBy(time: TRelative): void;
advanceTo(time: TAbsolute): void;
scheduleAbsolute(dueTime: TAbsolute, action: () => void): IDisposable;
scheduleAbsoluteWithState<TState>(state: TState, dueTime: TAbsolute, action: (scheduler: IScheduler, state: TState) => IDisposable): IDisposable;
scheduleRelative(dueTime: TRelative, action: () => void): IDisposable;
scheduleRelativeWithState<TState>(state: TState, dueTime: TRelative, action: (scheduler: IScheduler, state: TState) => IDisposable): IDisposable;
sleep(time: TRelative): void;
start(): IDisposable;
stop(): void;
isEnabled: boolean;
/* protected abstract */ add(from: TAbsolute, by: TRelative): TAbsolute;
/* protected abstract */ toDateTimeOffset(duetime: TAbsolute): number;
/* protected abstract */ toRelative(duetime: number): TRelative;
/* protected */ getNext(): internals.ScheduledItem<TAbsolute>;
}
export interface HistoricalScheduler extends VirtualTimeScheduler<number, number> {
}
export var HistoricalScheduler: {
new (initialClock: number, comparer: (first: number, second: number) => number): HistoricalScheduler;
};
}
declare module "rx.virtualtime" {
export = Rx;
}