chore(tslint): add tslint & clean up code

This commit is contained in:
Ibrahim Hadeed
2016-04-29 23:56:49 -04:00
parent 8b6d9f33f6
commit 06146b322f
58 changed files with 1014 additions and 941 deletions
+16 -12
View File
@@ -1,36 +1,36 @@
import {Plugin, Cordova} from './plugin';
import {Observable} from "rxjs/Observable";
import {Observable} from 'rxjs/Observable';
export interface accelerationData {
export interface AccelerationData {
/**
* Amount of acceleration on the x-axis. (in m/s^2)
*/
x : number,
x: number;
/**
* Amount of acceleration on the y-axis. (in m/s^2)
*/
y : number,
y: number;
/**
* Amount of acceleration on the z-axis. (in m/s^2)
*/
z : number,
z: number;
/**
* Creation timestamp in milliseconds.
*/
timestamp : any
timestamp: any;
}
export interface accelerometerOptions {
export interface AccelerometerOptions {
/**
* Requested period of calls to accelerometerSuccess with acceleration data in Milliseconds. Default: 10000
*/
frequency? : number
frequency?: number;
}
@@ -74,7 +74,9 @@ export class DeviceMotion {
* @returns {Promise<any>} Returns object with x, y, z, and timestamp properties
*/
@Cordova()
static getCurrentAcceleration(): Promise<accelerationData> { return }
static getCurrentAcceleration(): Promise<AccelerationData> {
return;
}
/**
* Watch the device acceleration. Clear the watch by unsubscribing from the observable.
@@ -89,12 +91,14 @@ export class DeviceMotion {
* subscription.unsubscribe();
* ```
* @param options
* @returns {Observable<accelerationData>}
* @returns {Observable<AccelerationData>}
*/
@Cordova({
callbackOrder: 'reverse',
observable: true,
clearFunction: 'clearWatch'
})
static watchAcceleration (options?: accelerometerOptions): Observable<accelerationData> { return }
}
static watchAcceleration(options?: AccelerometerOptions): Observable<AccelerationData> {
return;
}
}