1 | import { IDisposable } from '@lumino/disposable';
|
2 | import { ISignal } from '@lumino/signaling';
|
3 |
|
4 |
|
5 |
|
6 | export declare class ActivityMonitor<Sender, Args> implements IDisposable {
|
7 | |
8 |
|
9 |
|
10 | constructor(options: ActivityMonitor.IOptions<Sender, Args>);
|
11 | /**
|
12 | * A signal emitted when activity has ceased.
|
13 | */
|
14 | get activityStopped(): ISignal<this, ActivityMonitor.IArguments<Sender, Args>>;
|
15 | /**
|
16 | * The timeout associated with the monitor, in milliseconds.
|
17 | */
|
18 | get timeout(): number;
|
19 | set timeout(value: number);
|
20 | /**
|
21 | * Test whether the monitor has been disposed.
|
22 | *
|
23 | * #### Notes
|
24 | * This is a read-only property.
|
25 | */
|
26 | get isDisposed(): boolean;
|
27 | /**
|
28 | * Dispose of the resources used by the activity monitor.
|
29 | */
|
30 | dispose(): void;
|
31 | /**
|
32 | * A signal handler for the monitored signal.
|
33 | */
|
34 | private _onSignalFired;
|
35 | private _timer;
|
36 | private _timeout;
|
37 | private _sender;
|
38 | private _args;
|
39 | private _isDisposed;
|
40 | private _activityStopped;
|
41 | }
|
42 | /**
|
43 | * The namespace for `ActivityMonitor` statics.
|
44 | */
|
45 | export declare namespace ActivityMonitor {
|
46 | |
47 |
|
48 |
|
49 | interface IOptions<Sender, Args> {
|
50 | |
51 |
|
52 |
|
53 | signal: ISignal<Sender, Args>;
|
54 | |
55 |
|
56 |
|
57 |
|
58 |
|
59 | timeout?: number;
|
60 | }
|
61 | |
62 |
|
63 |
|
64 |
|
65 | interface IArguments<Sender, Args> {
|
66 | |
67 |
|
68 |
|
69 | sender: Sender;
|
70 | |
71 |
|
72 |
|
73 | args: Args;
|
74 | }
|
75 | }
|