mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-17 00:51:07 +08:00
fix(plugins): fix optional options
This commit is contained in:
parent
e708bc6be7
commit
9ef850c66a
@ -30,12 +30,12 @@ export interface CompassOptions {
|
|||||||
/**
|
/**
|
||||||
* How often to retrieve the compass heading in milliseconds. (Number) (Default: 100)
|
* How often to retrieve the compass heading in milliseconds. (Number) (Default: 100)
|
||||||
*/
|
*/
|
||||||
frequency : number,
|
frequency? : number,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The change in degrees required to initiate a watchHeading success callback. When this value is set, frequency is ignored. (Number)
|
* The change in degrees required to initiate a watchHeading success callback. When this value is set, frequency is ignored. (Number)
|
||||||
*/
|
*/
|
||||||
filter : number
|
filter? : number
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ export interface GeolocationOptions {
|
|||||||
* retrieve the real current position. If set to Infinity the device must
|
* retrieve the real current position. If set to Infinity the device must
|
||||||
* return a cached position regardless of its age. Default: 0.
|
* return a cached position regardless of its age. Default: 0.
|
||||||
*/
|
*/
|
||||||
maximumAge: number;
|
maximumAge?: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is a positive long value representing the maximum length of time
|
* Is a positive long value representing the maximum length of time
|
||||||
@ -77,7 +77,7 @@ export interface GeolocationOptions {
|
|||||||
* position. The default value is Infinity, meaning that getCurrentPosition()
|
* position. The default value is Infinity, meaning that getCurrentPosition()
|
||||||
* won't return until the position is available.
|
* won't return until the position is available.
|
||||||
*/
|
*/
|
||||||
timeout: number;
|
timeout?: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates the application would like to receive the best possible results.
|
* Indicates the application would like to receive the best possible results.
|
||||||
@ -88,7 +88,7 @@ export interface GeolocationOptions {
|
|||||||
* responding more quickly and/or using less power. Default: false.
|
* responding more quickly and/or using less power. Default: false.
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
*/
|
*/
|
||||||
enableHighAccuracy: boolean;
|
enableHighAccuracy?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,43 +6,43 @@ export interface launchNavigatorOptions {
|
|||||||
* iOS, Android, Windows
|
* iOS, Android, Windows
|
||||||
* If true, the plugin will NOT attempt to use the geolocation plugin to determine the current device position when the start location parameter is omitted. Defaults to false.
|
* If true, the plugin will NOT attempt to use the geolocation plugin to determine the current device position when the start location parameter is omitted. Defaults to false.
|
||||||
*/
|
*/
|
||||||
disableAutoGeolocation : boolean,
|
disableAutoGeolocation? : boolean,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* iOS, Android, Windows
|
* iOS, Android, Windows
|
||||||
* Transportation mode for navigation: "driving", "walking" or "transit". Defaults to "driving" if not specified.
|
* Transportation mode for navigation: "driving", "walking" or "transit". Defaults to "driving" if not specified.
|
||||||
*/
|
*/
|
||||||
transportMode : string,
|
transportMode? : string,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* iOS
|
* iOS
|
||||||
* If true, plugin will attempt to launch Google Maps instead of Apple Maps. If Google Maps is not available, it will fall back to Apple Maps.
|
* If true, plugin will attempt to launch Google Maps instead of Apple Maps. If Google Maps is not available, it will fall back to Apple Maps.
|
||||||
*/
|
*/
|
||||||
preferGoogleMaps : boolean,
|
preferGoogleMaps? : boolean,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* iOS
|
* iOS
|
||||||
* If using Google Maps and the app has a URL scheme, passing this to Google Maps will display a button which returns to the app.
|
* If using Google Maps and the app has a URL scheme, passing this to Google Maps will display a button which returns to the app.
|
||||||
*/
|
*/
|
||||||
urlScheme : string,
|
urlScheme? : string,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* iOS
|
* iOS
|
||||||
* If using Google Maps with a URL scheme, this specifies the text of the button in Google Maps which returns to the app. Defaults to "Back" if not specified.
|
* If using Google Maps with a URL scheme, this specifies the text of the button in Google Maps which returns to the app. Defaults to "Back" if not specified.
|
||||||
*/
|
*/
|
||||||
backButtonText : string,
|
backButtonText? : string,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* iOS
|
* iOS
|
||||||
* If true, debug log output will be generated by the plugin. Defaults to false.
|
* If true, debug log output will be generated by the plugin. Defaults to false.
|
||||||
*/
|
*/
|
||||||
enableDebug : boolean,
|
enableDebug? : boolean,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Android
|
* Android
|
||||||
* Navigation mode in which to open Google Maps app: "maps" or "turn-by-turn". Defaults to "maps" if not specified.
|
* Navigation mode in which to open Google Maps app: "maps" or "turn-by-turn". Defaults to "maps" if not specified.
|
||||||
*/
|
*/
|
||||||
navigationMode : string,
|
navigationMode? : string,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,64 +194,64 @@ export interface Notification {
|
|||||||
* A unique identifier required to clear, cancel, update or retrieve the local notification in the future
|
* A unique identifier required to clear, cancel, update or retrieve the local notification in the future
|
||||||
* Default: 0
|
* Default: 0
|
||||||
*/
|
*/
|
||||||
id : number,
|
id? : number,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* First row of the notification
|
* First row of the notification
|
||||||
* Default: Empty string (iOS) or the app name (Android)
|
* Default: Empty string (iOS) or the app name (Android)
|
||||||
*/
|
*/
|
||||||
title : string,
|
title? : string,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Second row of the notification
|
* Second row of the notification
|
||||||
* Default: Empty string
|
* Default: Empty string
|
||||||
*/
|
*/
|
||||||
text : string,
|
text? : string,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The interval at which to reschedule the local notification. That can be a value of second, minute, hour, day, week, month or year
|
* The interval at which to reschedule the local notification. That can be a value of second, minute, hour, day, week, month or year
|
||||||
* Default: 0 (which means that the system triggers the local notification once)
|
* Default: 0 (which means that the system triggers the local notification once)
|
||||||
*/
|
*/
|
||||||
every : string,
|
every? : string,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The date and time when the system should deliver the local notification. If the specified value is nil or is a date in the past, the local notification is delivered immediately.
|
* The date and time when the system should deliver the local notification. If the specified value is nil or is a date in the past, the local notification is delivered immediately.
|
||||||
* Default: now ~ new Date()
|
* Default: now ~ new Date()
|
||||||
*/
|
*/
|
||||||
at : any,
|
at? : any,
|
||||||
firstAt : any,
|
firstAt? : any,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number currently set as the badge of the app icon in Springboard (iOS) or at the right-hand side of the local notification (Android)
|
* The number currently set as the badge of the app icon in Springboard (iOS) or at the right-hand side of the local notification (Android)
|
||||||
* Default: 0 (which means don't show a number)
|
* Default: 0 (which means don't show a number)
|
||||||
*/
|
*/
|
||||||
badge : number,
|
badge? : number,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Uri of the file containing the sound to play when an alert is displayed
|
* Uri of the file containing the sound to play when an alert is displayed
|
||||||
* Default: res://platform_default
|
* Default: res://platform_default
|
||||||
*/
|
*/
|
||||||
sound : string,
|
sound? : string,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Arbitrary data, objects will be encoded to JSON string
|
* Arbitrary data, objects will be encoded to JSON string
|
||||||
* Default: null
|
* Default: null
|
||||||
*/
|
*/
|
||||||
data : any,
|
data? : any,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ANDROID ONLY
|
* ANDROID ONLY
|
||||||
* Uri of the icon that is shown in the ticker and notification
|
* Uri of the icon that is shown in the ticker and notification
|
||||||
* Default: res://icon
|
* Default: res://icon
|
||||||
*/
|
*/
|
||||||
icon : string,
|
icon? : string,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ANDROID ONLY
|
* ANDROID ONLY
|
||||||
* Uri of the resource (only res://) to use in the notification layouts. Different classes of devices may return different sizes
|
* Uri of the resource (only res://) to use in the notification layouts. Different classes of devices may return different sizes
|
||||||
* Default: res://ic_popup_reminder
|
* Default: res://ic_popup_reminder
|
||||||
*/
|
*/
|
||||||
smallIcon : string,
|
smallIcon? : string,
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -261,12 +261,12 @@ export interface Notification {
|
|||||||
* - They do not have an 'X' close button, and are not affected by the "Clear all" button
|
* - They do not have an 'X' close button, and are not affected by the "Clear all" button
|
||||||
* Default: false
|
* Default: false
|
||||||
*/
|
*/
|
||||||
ongoing : boolean,
|
ongoing? : boolean,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ANDROID ONLY
|
* ANDROID ONLY
|
||||||
* ARGB value that you would like the LED on the device to blink
|
* ARGB value that you would like the LED on the device to blink
|
||||||
* Default: FFFFFF
|
* Default: FFFFFF
|
||||||
*/
|
*/
|
||||||
led : string
|
led? : string
|
||||||
}
|
}
|
@ -232,7 +232,7 @@ export interface AndroidPushOptions {
|
|||||||
* If the array contains one or more strings each string will be used to
|
* If the array contains one or more strings each string will be used to
|
||||||
* subscribe to a GcmPubSub topic.
|
* subscribe to a GcmPubSub topic.
|
||||||
*/
|
*/
|
||||||
topics: string[];
|
topics?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PushOptions {
|
export interface PushOptions {
|
||||||
|
@ -8,9 +8,9 @@ export interface smsOptions {
|
|||||||
/**
|
/**
|
||||||
* Set to true to replace \n by a new line. Default: false
|
* Set to true to replace \n by a new line. Default: false
|
||||||
*/
|
*/
|
||||||
replaceLineBreaks : boolean,
|
replaceLineBreaks? : boolean,
|
||||||
|
|
||||||
android : smsOptionsAndroid
|
android? : smsOptionsAndroid
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ export interface smsOptionsAndroid {
|
|||||||
/**
|
/**
|
||||||
* Set to "INTENT" to send SMS with the native android SMS messaging. Leaving it empty will send the SMS without opening any app.
|
* Set to "INTENT" to send SMS with the native android SMS messaging. Leaving it empty will send the SMS without opening any app.
|
||||||
*/
|
*/
|
||||||
intent : string
|
intent? : string
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user