UNPKG

1.4 kBTypeScriptView Raw
1// Type definitions for cordova-plugin-device 2.0
2// Project: https://github.com/apache/cordova-plugin-device
3// Definitions by: Microsoft Open Technologies Inc <http://msopentech.com>
4// Tim Brust <https://github.com/timbru31>
5// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
6
7/**
8 * This plugin defines a global device object, which describes the device's hardware and software.
9 * Although the object is in the global scope, it is not available until after the deviceready event.
10 */
11interface Device {
12 /** Get the version of Cordova running on the device. */
13 cordova: string;
14 /** Indicates that Cordova initialize successfully. */
15 available: boolean;
16 /**
17 * The device.model returns the name of the device's model or product. The value is set
18 * by the device manufacturer and may be different across versions of the same product.
19 */
20 model: string;
21 /** Get the device's operating system name. */
22 platform: string;
23 /** Get the device's Universally Unique Identifier (UUID). */
24 uuid: string;
25 /** Get the operating system version. */
26 version: string;
27 /** Get the device's manufacturer. */
28 manufacturer: string;
29 /** Whether the device is running on a simulator. */
30 isVirtual: boolean;
31 /** Get the device hardware serial number. */
32 serial: string;
33}
34
35declare var device: Device;
\No newline at end of file