mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-07 23:03:19 +08:00
options are optional
This commit is contained in:
parent
e05f901bf3
commit
427611d109
@ -127,7 +127,7 @@ export class Geolocation {
|
|||||||
* @return Returns a Promise that resolves with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or rejects with an error.
|
* @return Returns a Promise that resolves with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or rejects with an error.
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getCurrentPosition(options: GeolocationOptions){
|
static getCurrentPosition(options?: GeolocationOptions){
|
||||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
// This Promise is replaced by one from the @Cordova decorator that wraps
|
||||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
||||||
// knows that the correct return type is Promise, because there's no way
|
// knows that the correct return type is Promise, because there's no way
|
||||||
@ -157,7 +157,7 @@ export class Geolocation {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'clearWatch'
|
clearFunction: 'clearWatch'
|
||||||
})
|
})
|
||||||
static watchPosition(options: GeolocationOptions){
|
static watchPosition(options?: GeolocationOptions){
|
||||||
// This Observable is replaced by one from the @Cordova decorator that wraps
|
// This Observable is replaced by one from the @Cordova decorator that wraps
|
||||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
||||||
// knows that the correct return type is Observable, because there's no way
|
// knows that the correct return type is Observable, because there's no way
|
||||||
|
Loading…
Reference in New Issue
Block a user