mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-01 02:53:03 +08:00
docs(): properly document optional params
This commit is contained in:
parent
047c236191
commit
0750e03e04
@ -33,7 +33,7 @@ export class Base64ToGallery {
|
|||||||
/**
|
/**
|
||||||
* Converts a base64 string to an image file in the device gallery
|
* 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 {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<any>} returns a promise that resolves when the image is saved.
|
* @returns {Promise<any>} returns a promise that resolves when the image is saved.
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
|
@ -187,7 +187,7 @@ export class CameraPreview {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Take the picture (base64)
|
* 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<any>}
|
* @return {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
|
@ -201,7 +201,7 @@ export class Camera {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Take a picture or video, or load one from the library.
|
* 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<any>} 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.
|
* @returns {Promise<any>} 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({
|
@Cordova({
|
||||||
|
@ -234,7 +234,7 @@ export class Diagnostic {
|
|||||||
* Returns the location authorization status for the application.
|
* 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.
|
* 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<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({ platforms: ['Android', 'iOS'], callbackOrder: 'reverse' })
|
@Cordova({ platforms: ['Android', 'iOS'], callbackOrder: 'reverse' })
|
||||||
|
@ -84,7 +84,7 @@ export class EmailComposer {
|
|||||||
/**
|
/**
|
||||||
* Verifies if sending emails is supported on the device.
|
* 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<any>} Resolves if available, rejects if not available
|
* @returns {Promise<any>} Resolves if available, rejects if not available
|
||||||
*/
|
*/
|
||||||
@CordovaCheck()
|
@CordovaCheck()
|
||||||
@ -123,7 +123,7 @@ export class EmailComposer {
|
|||||||
* Displays the email composer pre-filled with data.
|
* Displays the email composer pre-filled with data.
|
||||||
*
|
*
|
||||||
* @param options {EmailComposerOptions} Email
|
* @param options {EmailComposerOptions} Email
|
||||||
* @param scope {any?} An optional scope for the promise
|
* @param [scope] {any} Scope for the promise
|
||||||
* @returns {Promise<any>} Resolves promise when the EmailComposer has been opened
|
* @returns {Promise<any>} Resolves promise when the EmailComposer has been opened
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
|
@ -381,7 +381,7 @@ export class EstimoteBeacons {
|
|||||||
* @param [notifyEntryStateOnDisplay=false] {boolean} Set to true to detect if you
|
* @param [notifyEntryStateOnDisplay=false] {boolean} Set to true to detect if you
|
||||||
* are inside a region when the user turns display on, see
|
* 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}
|
* {@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<any>} Returns an Observable that notifies of each region state discovered.
|
* @returns {Observable<any>} Returns an Observable that notifies of each region state discovered.
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
|
@ -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.
|
* @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
|
* @param {string} options.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.picture] image to be displayed in the App Invite dialog
|
||||||
*
|
|
||||||
* @returns {Promise<any>} Returns a Promise that resolves with the result data, or rejects with an error
|
* @returns {Promise<any>} Returns a Promise that resolves with the result data, or rejects with an error
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
|
@ -85,7 +85,7 @@ export class Gyroscope {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Watching for gyroscope sensor changes
|
* Watching for gyroscope sensor changes
|
||||||
* @param options {GyroscopeOptions} (optional)
|
* @param {GyroscopeOptions} [options]
|
||||||
* @return {Observable<GyroscopeOrientation>} Returns an Observable that resolves GyroscopeOrientation
|
* @return {Observable<GyroscopeOrientation>} Returns an Observable that resolves GyroscopeOrientation
|
||||||
*/
|
*/
|
||||||
watch(options?: GyroscopeOptions): Observable<GyroscopeOrientation> {
|
watch(options?: GyroscopeOptions): Observable<GyroscopeOrientation> {
|
||||||
@ -99,7 +99,7 @@ export class Gyroscope {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get current data from gyroscope sensor
|
* Get current data from gyroscope sensor
|
||||||
* @param options {GyroscopeOptions} (optional)
|
* @param {GyroscopeOptions} [options]
|
||||||
* @return {Promise<GyroscopeOrientation>} Returns a promise that resolves GyroscopeOrientation
|
* @return {Promise<GyroscopeOrientation>} Returns a promise that resolves GyroscopeOrientation
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
|
@ -69,9 +69,9 @@ export class InAppBrowserObject {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser.
|
* Opens a URL in a new InAppBrowser instance, the current browser instance, or the system browser.
|
||||||
* @param url The URL to load.
|
* @param {string} url The URL to load.
|
||||||
* @param target The target in which to load the URL, an optional parameter that defaults to _self.
|
* @param {string} [target="self"] 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 | InAppBrowserOptions} [options] Options for the InAppBrowser. Optional, defaulting to: location=yes.
|
||||||
* The options string must not contain any blank space, and each feature's
|
* 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.
|
* name/value pairs must be separated by a comma. Feature names are case insensitive.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user