mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
chore(device): update Device
This commit is contained in:
+25
-3
@@ -1,7 +1,30 @@
|
||||
import {Plugin, RequiresPlugin} from './plugin';
|
||||
|
||||
declare var window;
|
||||
declare var window: {
|
||||
device: Device
|
||||
};
|
||||
|
||||
export interface Device {
|
||||
/** Get the version of Cordova running on the device. */
|
||||
cordova: string;
|
||||
/**
|
||||
* The device.model returns the name of the device's model or product. The value is set
|
||||
* by the device manufacturer and may be different across versions of the same product.
|
||||
*/
|
||||
model: string;
|
||||
/** Get the device's operating system name. */
|
||||
platform: string;
|
||||
/** Get the device's Universally Unique Identifier (UUID). */
|
||||
uuid: string;
|
||||
/** Get the operating system version. */
|
||||
version: string;
|
||||
/** Get the device's manufacturer. */
|
||||
manufacturer: string;
|
||||
/** Whether the device is running on a simulator. */
|
||||
isVirtual: boolean;
|
||||
/** Get the device hardware serial number. */
|
||||
serial: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Access information about the underlying device and platform.
|
||||
@@ -9,7 +32,6 @@ declare var window;
|
||||
* @usage
|
||||
* ```js
|
||||
* let info = Device.getDevice();
|
||||
* // Device sits below
|
||||
* ```
|
||||
*/
|
||||
@Plugin({
|
||||
@@ -21,7 +43,7 @@ export class Device {
|
||||
|
||||
/**
|
||||
* Returns the whole device object.
|
||||
* @see https://github.com/apache/cordova-plugin-device
|
||||
*
|
||||
* @returns {Object} The device object.
|
||||
*/
|
||||
@RequiresPlugin
|
||||
|
||||
Reference in New Issue
Block a user