mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Update `TypeScript Version`s to be at least as high as dependencies' versions * Run through again
74 lines
1.9 KiB
TypeScript
74 lines
1.9 KiB
TypeScript
// Type definitions for express-useragent 0.2.4
|
|
// Project: https://www.npmjs.org/package/express-useragent
|
|
// Definitions by: Isman Usoh <https://github.com/isman-usoh/>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.2
|
|
|
|
/// <reference types="express" />
|
|
|
|
declare namespace Express {
|
|
interface Request {
|
|
useragent?: ExpressUseragent.UserAgent;
|
|
}
|
|
}
|
|
|
|
declare namespace ExpressUseragent {
|
|
import express = Express;
|
|
|
|
interface UserAgent {
|
|
isMobile: boolean;
|
|
isTablet: boolean;
|
|
isiPad: boolean;
|
|
isiPod: boolean;
|
|
isiPhone: boolean;
|
|
isAndroid: boolean;
|
|
isBlackberry: boolean;
|
|
isOpera: boolean;
|
|
isIE: boolean;
|
|
isEdge: boolean;
|
|
isIECompatibilityMode: boolean;
|
|
isSafari: boolean;
|
|
isFirefox: boolean;
|
|
isWebkit: boolean;
|
|
isChrome: boolean;
|
|
isKonqueror: boolean;
|
|
isOmniWeb: boolean;
|
|
isSeaMonkey: boolean;
|
|
isFlock: boolean;
|
|
isAmaya: boolean;
|
|
isEpiphany: boolean;
|
|
isDesktop: boolean;
|
|
isWindows: boolean;
|
|
isWindowsPhone: boolean;
|
|
isLinux: boolean;
|
|
isLinux64: boolean;
|
|
isMac: boolean;
|
|
isChromeOS: boolean;
|
|
isBada: boolean;
|
|
isSamsung: boolean;
|
|
isRaspberry: boolean;
|
|
isBot: boolean;
|
|
isCurl: boolean;
|
|
isAndroidTablet: boolean;
|
|
isWinJs: boolean;
|
|
isKindleFire: boolean;
|
|
isSilk: boolean;
|
|
isCaptive: boolean;
|
|
isSmartTV: boolean;
|
|
silkAccelerated: boolean;
|
|
browser: string;
|
|
version: string;
|
|
os: string;
|
|
platform: string;
|
|
geoIp: any;
|
|
source: string;
|
|
}
|
|
|
|
function parse(source: string): UserAgent;
|
|
function express(): (req: express.Request, res: express.Response, next?: Function) => void;
|
|
}
|
|
|
|
declare module "express-useragent" {
|
|
export = ExpressUseragent;
|
|
}
|