forked from siberiacancode/reactuse
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeclarations.d.ts
More file actions
52 lines (45 loc) · 1.06 KB
/
declarations.d.ts
File metadata and controls
52 lines (45 loc) · 1.06 KB
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
interface Connection extends EventTarget {
readonly downlink: number;
readonly downlinkMax: number;
readonly effectiveType: 'slow-2g' | '2g' | '3g' | '4g';
readonly rtt: number;
readonly saveData: boolean;
readonly type:
| 'bluetooth'
| 'cellular'
| 'ethernet'
| 'mixed'
| 'none'
| 'other'
| 'unknown'
| 'wifi'
| 'wimax';
onChange: (event: Event) => void;
}
interface BatteryManager extends EventTarget {
charging: boolean;
chargingTime: number;
dischargingTime: number;
level: number;
}
interface ColorSelectionOptions {
signal?: AbortSignal;
}
interface ColorSelectionResult {
sRGBHex: string;
}
interface EyeDropper {
open: (options?: ColorSelectionOptions) => Promise<ColorSelectionResult>;
}
interface Navigator {
readonly connection: Connection;
readonly mozConnection: Connection;
readonly webkitConnection: Connection;
readonly getBattery: () => Promise<BatteryManager>;
}
interface EyeDropperConstructor {
new (): EyeDropper;
}
interface Window {
EyeDropper?: EyeDropperConstructor | undefined;
}