chore(): optimize CordovaProperty and InstanceProperty decorators (#635)

* chore(): optimize InstanceProperty wrapper

* chore(): optimize CordovaProperty wrapper

* tslint'

* fix decorators
This commit is contained in:
Ibrahim Hadeed
2016-12-04 11:42:30 -05:00
committed by GitHub
parent 717c1438c4
commit abc90f2e6a
10 changed files with 87 additions and 88 deletions
+6 -5
View File
@@ -1,11 +1,12 @@
import { CordovaProperty, Plugin } from './plugin';
declare var window: {
device: Device
};
declare var window: any;
export interface Device {
/**
* @private
*/
export interface IDevice {
/** Get the version of Cordova running on the device. */
cordova: string;
/**
@@ -54,6 +55,6 @@ export class Device {
* @returns {Device} The device object.
*/
@CordovaProperty
static get device(): Device { return window.device; }
static device: IDevice;
}