Skip to content

Commit 5ae741f

Browse files
committed
Create express-useragent.d.ts
1 parent 6766ed1 commit 5ae741f

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
// Type definitions for express-useragent 0.2.4
2+
// Project: https://www.npmjs.org/package/express-useragent
3+
// Definitions by: Isman Usoh <https://github.com/isman-usoh/>
4+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5+
6+
/// <reference path="../express/express.d.ts" />
7+
8+
declare namespace Express {
9+
interface UserAgent {
10+
isMobile: boolean;
11+
isTablet: boolean;
12+
isiPad: boolean;
13+
isiPod: boolean;
14+
isiPhone: boolean;
15+
isAndroid: boolean;
16+
isBlackberry: boolean;
17+
isOpera: boolean;
18+
isIE: boolean;
19+
isEdge: boolean;
20+
isIECompatibilityMode: boolean;
21+
isSafari: boolean;
22+
isFirefox: boolean;
23+
isWebkit: boolean;
24+
isChrome: boolean;
25+
isKonqueror: boolean;
26+
isOmniWeb: boolean;
27+
isSeaMonkey: boolean;
28+
isFlock: boolean;
29+
isAmaya: boolean;
30+
isEpiphany: boolean;
31+
isDesktop: boolean;
32+
isWindows: boolean;
33+
isWindowsPhone: boolean;
34+
isLinux: boolean;
35+
isLinux64: boolean;
36+
isMac: boolean;
37+
isChromeOS: boolean;
38+
isBada: boolean;
39+
isSamsung: boolean;
40+
isRaspberry: boolean;
41+
isBot: boolean;
42+
isCurl: boolean;
43+
isAndroidTablet: boolean;
44+
isWinJs: boolean;
45+
isKindleFire: boolean;
46+
isSilk: boolean;
47+
isCaptive: boolean;
48+
isSmartTV: boolean;
49+
silkAccelerated: boolean;
50+
browser: string;
51+
version: string;
52+
os: string;
53+
platform: string;
54+
geoIp: any;
55+
source: string;
56+
}
57+
58+
interface Request {
59+
useragent?: UserAgent;
60+
}
61+
}
62+
63+
declare module "express-useragent" {
64+
import express = require("express");
65+
66+
export function express(): (req: express.Request, res: express.Response, next?: Function) => void;
67+
}

0 commit comments

Comments
 (0)