From a235b2493fb2de48febbf48dc5b16b51c830efe8 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 8 Apr 2018 20:51:53 +0200 Subject: [PATCH] docs(device-orientation): fix jsodc --- .../plugins/device-orientation/index.ts | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/src/@ionic-native/plugins/device-orientation/index.ts b/src/@ionic-native/plugins/device-orientation/index.ts index ffd4e52aa..a45a3a167 100644 --- a/src/@ionic-native/plugins/device-orientation/index.ts +++ b/src/@ionic-native/plugins/device-orientation/index.ts @@ -1,9 +1,8 @@ import { Injectable } from '@angular/core'; -import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; +import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; import { Observable } from 'rxjs/Observable'; export interface DeviceOrientationCompassHeading { - /** * The heading in degrees from 0-359.99 at a single moment in time. (Number) */ @@ -23,11 +22,9 @@ export interface DeviceOrientationCompassHeading { * The time at which this heading was determined. (DOMTimeStamp) */ timestamp: number; - } export interface DeviceOrientationCompassOptions { - /** * How often to retrieve the compass heading in milliseconds. (Number) (Default: 100) */ @@ -37,7 +34,6 @@ export interface DeviceOrientationCompassOptions { * The change in degrees required to initiate a watchHeading success callback. When this value is set, frequency is ignored. (Number) */ filter?: number; - } /** @@ -77,23 +73,35 @@ export interface DeviceOrientationCompassOptions { plugin: 'cordova-plugin-device-orientation', pluginRef: 'navigator.compass', repo: 'https://github.com/apache/cordova-plugin-device-orientation', - platforms: ['Amazon Fire OS', 'Android', 'BlackBerry 10', 'Browser', 'Firefox OS', 'iOS', 'Tizen', 'Ubuntu', 'Windows', 'Windows Phone'] + platforms: [ + 'Amazon Fire OS', + 'Android', + 'BlackBerry 10', + 'Browser', + 'Firefox OS', + 'iOS', + 'Tizen', + 'Ubuntu', + 'Windows', + 'Windows Phone' + ] }) @Injectable() export class DeviceOrientation extends IonicNativePlugin { - /** * Get the current compass heading. * @returns {Promise} */ @Cordova() - getCurrentHeading(): Promise { return; } + getCurrentHeading(): Promise { + return; + } /** * Get the device current heading at a regular interval * * Stop the watch by unsubscribing from the observable - * @param {DeviceOrientationCompassOptions} options Options for compass. Frequency and Filter. Optional + * @param {DeviceOrientationCompassOptions} [options] Options for compass. Frequency and Filter. Optional * @returns {Observable} Returns an observable that contains the compass heading */ @Cordova({ @@ -101,6 +109,9 @@ export class DeviceOrientation extends IonicNativePlugin { observable: true, clearFunction: 'clearWatch' }) - watchHeading(options?: DeviceOrientationCompassOptions): Observable { return; } - + watchHeading( + options?: DeviceOrientationCompassOptions + ): Observable { + return; + } }