UNPKG

1.27 kBTypeScriptView Raw
1export declare type Platforms = keyof typeof PLATFORMS_MAP;
2interface IsPlatformSignature {
3 (plt: Platforms): boolean;
4 (win: Window, plt: Platforms): boolean;
5}
6export declare const getPlatforms: (win?: any) => ("ios" | "ipad" | "iphone" | "android" | "phablet" | "tablet" | "cordova" | "capacitor" | "electron" | "pwa" | "mobile" | "mobileweb" | "desktop" | "hybrid")[];
7export declare const isPlatform: IsPlatformSignature;
8export declare const setupPlatforms: (win?: any) => ("ios" | "ipad" | "iphone" | "android" | "phablet" | "tablet" | "cordova" | "capacitor" | "electron" | "pwa" | "mobile" | "mobileweb" | "desktop" | "hybrid")[];
9export declare const testUserAgent: (win: Window, expr: RegExp) => boolean;
10declare const PLATFORMS_MAP: {
11 ipad: (win: Window) => boolean;
12 iphone: (win: Window) => boolean;
13 ios: (win: Window) => boolean;
14 android: (win: Window) => boolean;
15 phablet: (win: Window) => boolean;
16 tablet: (win: Window) => boolean;
17 cordova: (win: any) => boolean;
18 capacitor: (win: any) => boolean;
19 electron: (win: Window) => boolean;
20 pwa: (win: Window) => boolean;
21 mobile: (win: Window) => boolean;
22 mobileweb: (win: Window) => boolean;
23 desktop: (win: Window) => boolean;
24 hybrid: (win: Window) => boolean;
25};
26export {};