Skip to content

Commit

Permalink
fix(plugins): fix optional options
Browse files Browse the repository at this point in the history
  • Loading branch information
ihadeed committed Mar 14, 2016
1 parent e708bc6 commit 9ef850c
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 29 deletions.
4 changes: 2 additions & 2 deletions src/plugins/deviceorientation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ export interface CompassOptions {
/**
* 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)
*/
filter : number
filter? : number

}

Expand Down
6 changes: 3 additions & 3 deletions src/plugins/geolocation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ export interface GeolocationOptions {
* retrieve the real current position. If set to Infinity the device must
* 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
* (in milliseconds) the device is allowed to take in order to return a
* position. The default value is Infinity, meaning that getCurrentPosition()
* won't return until the position is available.
*/
timeout: number;
timeout?: number;

/**
* Indicates the application would like to receive the best possible results.
Expand All @@ -88,7 +88,7 @@ export interface GeolocationOptions {
* responding more quickly and/or using less power. Default: false.
* @type {boolean}
*/
enableHighAccuracy: boolean;
enableHighAccuracy?: boolean;
}


Expand Down
14 changes: 7 additions & 7 deletions src/plugins/launchnavigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,43 @@ export interface launchNavigatorOptions {
* 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.
*/
disableAutoGeolocation : boolean,
disableAutoGeolocation? : boolean,

/**
* iOS, Android, Windows
* Transportation mode for navigation: "driving", "walking" or "transit". Defaults to "driving" if not specified.
*/
transportMode : string,
transportMode? : string,

/**
* 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.
*/
preferGoogleMaps : boolean,
preferGoogleMaps? : boolean,

/**
* 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.
*/
urlScheme : string,
urlScheme? : string,

/**
* 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.
*/
backButtonText : string,
backButtonText? : string,

/**
* iOS
* If true, debug log output will be generated by the plugin. Defaults to false.
*/
enableDebug : boolean,
enableDebug? : boolean,

/**
* Android
* Navigation mode in which to open Google Maps app: "maps" or "turn-by-turn". Defaults to "maps" if not specified.
*/
navigationMode : string,
navigationMode? : string,

}

Expand Down
26 changes: 13 additions & 13 deletions src/plugins/localnotifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,64 +194,64 @@ export interface Notification {
* A unique identifier required to clear, cancel, update or retrieve the local notification in the future
* Default: 0
*/
id : number,
id? : number,

/**
* First row of the notification
* Default: Empty string (iOS) or the app name (Android)
*/
title : string,
title? : string,

/**
* Second row of the notification
* 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
* 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.
* Default: now ~ new Date()
*/
at : any,
firstAt : any,
at? : 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)
* 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
* Default: res://platform_default
*/
sound : string,
sound? : string,

/**
* Arbitrary data, objects will be encoded to JSON string
* Default: null
*/
data : any,
data? : any,

/**
* ANDROID ONLY
* Uri of the icon that is shown in the ticker and notification
* Default: res://icon
*/
icon : string,
icon? : string,

/**
* ANDROID ONLY
* 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
*/
smallIcon : string,
smallIcon? : string,


/**
Expand All @@ -261,12 +261,12 @@ export interface Notification {
* - They do not have an 'X' close button, and are not affected by the "Clear all" button
* Default: false
*/
ongoing : boolean,
ongoing? : boolean,

/**
* ANDROID ONLY
* ARGB value that you would like the LED on the device to blink
* Default: FFFFFF
*/
led : string
led? : string
}
2 changes: 1 addition & 1 deletion src/plugins/push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export interface AndroidPushOptions {
* If the array contains one or more strings each string will be used to
* subscribe to a GcmPubSub topic.
*/
topics: string[];
topics?: string[];
}

export interface PushOptions {
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/sms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export interface smsOptions {
/**
* Set to true to replace \n by a new line. Default: false
*/
replaceLineBreaks : boolean,
replaceLineBreaks? : boolean,

android : smsOptionsAndroid
android? : smsOptionsAndroid

}

Expand All @@ -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.
*/
intent : string
intent? : string

}

Expand Down

0 comments on commit 9ef850c

Please sign in to comment.