-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.d.ts
44 lines (38 loc) · 1.41 KB
/
index.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
42
43
44
// WICG Spec: https://wicg.github.io/ua-client-hints
declare interface Navigator extends NavigatorUA {}
declare interface WorkerNavigator extends NavigatorUA {}
// https://wicg.github.io/ua-client-hints/#navigatorua
declare interface NavigatorUA {
readonly userAgentData?: NavigatorUAData;
}
// https://wicg.github.io/ua-client-hints/#dictdef-navigatoruabrandversion
interface NavigatorUABrandVersion {
readonly brand: string;
readonly version: string;
}
// https://wicg.github.io/ua-client-hints/#dictdef-uadatavalues
interface UADataValues {
readonly brands?: NavigatorUABrandVersion[];
readonly mobile?: boolean;
readonly platform?: string;
readonly architecture?: string;
readonly bitness?: string;
readonly formFactor?: string[];
readonly model?: string;
readonly platformVersion?: string;
/** @deprecated in favour of fullVersionList */
readonly uaFullVersion?: string;
readonly fullVersionList?: NavigatorUABrandVersion[];
readonly wow64?: boolean;
}
// https://wicg.github.io/ua-client-hints/#dictdef-ualowentropyjson
interface UALowEntropyJSON {
readonly brands: NavigatorUABrandVersion[];
readonly mobile: boolean;
readonly platform: string;
}
// https://wicg.github.io/ua-client-hints/#navigatoruadata
interface NavigatorUAData extends UALowEntropyJSON {
getHighEntropyValues(hints: string[]): Promise<UADataValues>;
toJSON(): UALowEntropyJSON;
}