forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bowser.d.ts
54 lines (49 loc) · 1.32 KB
/
bowser.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
45
46
47
48
49
50
51
52
53
54
// Type definitions for Bowser 1.x
// Project: https://github.com/ded/bowser
// Definitions by: Paulo Cesar <https://github.com/pocesar>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module 'bowser' {
var def: BowserModule.IBowser;
export = def;
}
declare module BowserModule {
export interface IBowserUA {
msie: boolean;
chrome: boolean;
webkit: boolean;
phantom: boolean;
opera: boolean;
safari: boolean;
android: boolean;
ios: boolean;
webos: boolean;
msedge: boolean;
seamonkey: boolean;
firefox: boolean;
yandexbrowser: boolean;
blackberry: boolean;
tablet: boolean;
mobile: boolean;
silk: boolean;
bada: boolean;
tizen: boolean;
windowsphone: boolean;
firefoxos: boolean;
gecko: boolean;
sailfish: boolean;
chromeBook: boolean;
/** Grade A browser */
a: boolean;
/** Grade C browser */
c: boolean;
/** Grade X browser */
x: boolean;
name: string;
version: string|number;
osversion: string|number;
}
export interface IBowser extends IBowserUA {
test(browserList: string[]): boolean;
_detect(ua: string): IBowser;
}
}