1 |
|
2 |
|
3 | declare namespace Rx {
|
4 | interface VirtualTimeScheduler<TAbsolute, TRelative> extends Scheduler {
|
5 |
|
6 |
|
7 | advanceBy(time: TRelative): void;
|
8 | advanceTo(time: TAbsolute): void;
|
9 | scheduleAbsolute(dueTime: TAbsolute, action: () => void): IDisposable;
|
10 | scheduleAbsoluteWithState<TState>(
|
11 | state: TState,
|
12 | dueTime: TAbsolute,
|
13 | action: (scheduler: IScheduler, state: TState) => IDisposable,
|
14 | ): IDisposable;
|
15 | scheduleRelative(dueTime: TRelative, action: () => void): IDisposable;
|
16 | scheduleRelativeWithState<TState>(
|
17 | state: TState,
|
18 | dueTime: TRelative,
|
19 | action: (scheduler: IScheduler, state: TState) => IDisposable,
|
20 | ): IDisposable;
|
21 | sleep(time: TRelative): void;
|
22 | start(): IDisposable;
|
23 | stop(): void;
|
24 |
|
25 | isEnabled: boolean;
|
26 |
|
27 | add(from: TAbsolute, by: TRelative): TAbsolute;
|
28 | toDateTimeOffset(duetime: TAbsolute): number;
|
29 | toRelative(duetime: number): TRelative;
|
30 |
|
31 | getNext(): internals.ScheduledItem<TAbsolute>;
|
32 | }
|
33 |
|
34 | interface HistoricalScheduler extends VirtualTimeScheduler<number, number> {
|
35 | }
|
36 |
|
37 | const HistoricalScheduler: {
|
38 | new(initialClock: number, comparer: (first: number, second: number) => number): HistoricalScheduler;
|
39 | };
|
40 | }
|
41 |
|
42 | declare module "rx-lite-virtualtime" {
|
43 | export = Rx;
|
44 | }
|