From 0750e03e0427a568d78c8ebae136ba75ffaab743 Mon Sep 17 00:00:00 2001 From: Ibby Date: Thu, 23 Mar 2017 15:37:17 -0400 Subject: [PATCH] docs(): properly document optional params --- src/@ionic-native/plugins/base64-to-gallery/index.ts | 2 +- src/@ionic-native/plugins/camera-preview/index.ts | 2 +- src/@ionic-native/plugins/camera/index.ts | 2 +- src/@ionic-native/plugins/diagnostic/index.ts | 2 +- src/@ionic-native/plugins/email-composer/index.ts | 4 ++-- src/@ionic-native/plugins/estimote-beacons/index.ts | 2 +- src/@ionic-native/plugins/facebook/index.ts | 5 ++--- src/@ionic-native/plugins/gyroscope/index.ts | 4 ++-- src/@ionic-native/plugins/in-app-browser/index.ts | 6 +++--- 9 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/@ionic-native/plugins/base64-to-gallery/index.ts b/src/@ionic-native/plugins/base64-to-gallery/index.ts index 0e78238a2..1ade32732 100644 --- a/src/@ionic-native/plugins/base64-to-gallery/index.ts +++ b/src/@ionic-native/plugins/base64-to-gallery/index.ts @@ -33,7 +33,7 @@ export class Base64ToGallery { /** * Converts a base64 string to an image file in the device gallery * @param {string} data The actual base64 string that you want to save - * @param {any} options (optional) An object with properties: prefix: string, mediaScanner: boolean. Prefix will be prepended to the filename. If true, mediaScanner runs Media Scanner on Android and saves to Camera Roll on iOS; if false, saves to Library folder on iOS. + * @param {any} [options] An object with properties: prefix: string, mediaScanner: boolean. Prefix will be prepended to the filename. If true, mediaScanner runs Media Scanner on Android and saves to Camera Roll on iOS; if false, saves to Library folder on iOS. * @returns {Promise} returns a promise that resolves when the image is saved. */ @Cordova({ diff --git a/src/@ionic-native/plugins/camera-preview/index.ts b/src/@ionic-native/plugins/camera-preview/index.ts index 2b4575b51..5b4a6fea9 100644 --- a/src/@ionic-native/plugins/camera-preview/index.ts +++ b/src/@ionic-native/plugins/camera-preview/index.ts @@ -187,7 +187,7 @@ export class CameraPreview { /** * Take the picture (base64) - * @param options {CameraPreviewPictureOptions} optional - size and quality of the picture to take + * @param [options] {CameraPreviewPictureOptions} size and quality of the picture to take * @return {Promise} */ @Cordova({ diff --git a/src/@ionic-native/plugins/camera/index.ts b/src/@ionic-native/plugins/camera/index.ts index 4a128465b..c2f1d1add 100644 --- a/src/@ionic-native/plugins/camera/index.ts +++ b/src/@ionic-native/plugins/camera/index.ts @@ -201,7 +201,7 @@ export class Camera { /** * Take a picture or video, or load one from the library. - * @param {CameraOptions?} options optional. Options that you want to pass to the camera. Encoding type, quality, etc. Platform-specific quirks are described in the [Cordova plugin docs](https://github.com/apache/cordova-plugin-camera#cameraoptions-errata-). + * @param {CameraOptions} [options] Options that you want to pass to the camera. Encoding type, quality, etc. Platform-specific quirks are described in the [Cordova plugin docs](https://github.com/apache/cordova-plugin-camera#cameraoptions-errata-). * @returns {Promise} Returns a Promise that resolves with Base64 encoding of the image data, or the image file URI, depending on cameraOptions, otherwise rejects with an error. */ @Cordova({ diff --git a/src/@ionic-native/plugins/diagnostic/index.ts b/src/@ionic-native/plugins/diagnostic/index.ts index fdc157614..e4badbbe6 100644 --- a/src/@ionic-native/plugins/diagnostic/index.ts +++ b/src/@ionic-native/plugins/diagnostic/index.ts @@ -234,7 +234,7 @@ export class Diagnostic { * Returns the location authorization status for the application. * Note for Android: this is intended for Android 6 / API 23 and above. Calling on Android 5 / API 22 and below will always return GRANTED status as permissions are already granted at installation time. * - * mode - (iOS-only / optional) location authorization mode: "always" or "when_in_use". If not specified, defaults to "when_in_use". + * @param {string} [mode] iOS only: location authorization mode: "always" or "when_in_use". If not specified, defaults to "when_in_use". * @returns {Promise} */ @Cordova({ platforms: ['Android', 'iOS'], callbackOrder: 'reverse' }) diff --git a/src/@ionic-native/plugins/email-composer/index.ts b/src/@ionic-native/plugins/email-composer/index.ts index 58a6b3bb4..24dfaa6f0 100644 --- a/src/@ionic-native/plugins/email-composer/index.ts +++ b/src/@ionic-native/plugins/email-composer/index.ts @@ -84,7 +84,7 @@ export class EmailComposer { /** * Verifies if sending emails is supported on the device. * - * @param app {string?} An optional app id or uri scheme. + * @param [app] {string} App id or uri scheme. * @returns {Promise} Resolves if available, rejects if not available */ @CordovaCheck() @@ -123,7 +123,7 @@ export class EmailComposer { * Displays the email composer pre-filled with data. * * @param options {EmailComposerOptions} Email - * @param scope {any?} An optional scope for the promise + * @param [scope] {any} Scope for the promise * @returns {Promise} Resolves promise when the EmailComposer has been opened */ @Cordova({ diff --git a/src/@ionic-native/plugins/estimote-beacons/index.ts b/src/@ionic-native/plugins/estimote-beacons/index.ts index b3e932cc0..a64f932eb 100644 --- a/src/@ionic-native/plugins/estimote-beacons/index.ts +++ b/src/@ionic-native/plugins/estimote-beacons/index.ts @@ -381,7 +381,7 @@ export class EstimoteBeacons { * @param [notifyEntryStateOnDisplay=false] {boolean} Set to true to detect if you * are inside a region when the user turns display on, see * {@link https://developer.apple.com/library/prerelease/ios/documentation/CoreLocation/Reference/CLBeaconRegion_class/index.html#//apple_ref/occ/instp/CLBeaconRegion/notifyEntryStateOnDisplay|iOS documentation} - * for further details (optional, defaults to false, iOS only). + * for further details (iOS only). * @returns {Observable} Returns an Observable that notifies of each region state discovered. */ @Cordova({ diff --git a/src/@ionic-native/plugins/facebook/index.ts b/src/@ionic-native/plugins/facebook/index.ts index 00513de63..074d0f4ae 100644 --- a/src/@ionic-native/plugins/facebook/index.ts +++ b/src/@ionic-native/plugins/facebook/index.ts @@ -268,9 +268,8 @@ export class Facebook { * * * @param {Object} options An object containing an [App Link](https://developers.facebook.com/docs/applinks) URL to your app and an optional image URL. - * url: [App Link](https://developers.facebook.com/docs/applinks) to your app - * picture: image to be displayed in the App Invite dialog - * + * @param {string} options.url [App Link](https://developers.facebook.com/docs/applinks) to your app + * @param {string} [options.picture] image to be displayed in the App Invite dialog * @returns {Promise} Returns a Promise that resolves with the result data, or rejects with an error */ @Cordova() diff --git a/src/@ionic-native/plugins/gyroscope/index.ts b/src/@ionic-native/plugins/gyroscope/index.ts index 605d25ef2..5da810c07 100644 --- a/src/@ionic-native/plugins/gyroscope/index.ts +++ b/src/@ionic-native/plugins/gyroscope/index.ts @@ -85,7 +85,7 @@ export class Gyroscope { /** * Watching for gyroscope sensor changes - * @param options {GyroscopeOptions} (optional) + * @param {GyroscopeOptions} [options] * @return {Observable} Returns an Observable that resolves GyroscopeOrientation */ watch(options?: GyroscopeOptions): Observable { @@ -99,7 +99,7 @@ export class Gyroscope { /** * Get current data from gyroscope sensor - * @param options {GyroscopeOptions} (optional) + * @param {GyroscopeOptions} [options] * @return {Promise} Returns a promise that resolves GyroscopeOrientation */ @Cordova({ diff --git a/src/@ionic-native/plugins/in-app-browser/index.ts b/src/@ionic-native/plugins/in-app-browser/index.ts index a4f8a2da0..de97bd577 100644 --- a/src/@ionic-native/plugins/in-app-browser/index.ts +++ b/src/@ionic-native/plugins/in-app-browser/index.ts @@ -69,9 +69,9 @@ export class InAppBrowserObject { /** * Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser. - * @param url The URL to load. - * @param target The target in which to load the URL, an optional parameter that defaults to _self. - * @param options Options for the InAppBrowser. Optional, defaulting to: location=yes. + * @param {string} url The URL to load. + * @param {string} [target="self"] The target in which to load the URL, an optional parameter that defaults to _self. + * @param {string | InAppBrowserOptions} [options] Options for the InAppBrowser. Optional, defaulting to: location=yes. * The options string must not contain any blank space, and each feature's * name/value pairs must be separated by a comma. Feature names are case insensitive. */