Skip to content

Commit

Permalink
fix(background-geolocation): configure returns a promise
Browse files Browse the repository at this point in the history
closes #1118
  • Loading branch information
ihadeed committed Mar 2, 2017
1 parent 281e37e commit fc87992
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/plugins/background-geolocation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,14 +365,12 @@ export class BackgroundGeolocation {
* @param {Function} callback callback will be called when background location is determined.
* @param {Function} errorCallback callback to be executed every time a geolocation error occurs.
* @param {Config} options An object of type Config
* @return Location object, which tries to mimic w3c Coordinates interface.
* See http://dev.w3.org/geo/api/spec-source.html#coordinates_interface
* Callback to be executed every time a geolocation is recorded in the background.
* @return {Promise<any>}
*/
@Cordova({
sync: true
callbackOrder: 'reverse'
})
static configure(callback: Function, errorCallback: Function, options: BackgroundGeolocationConfig): any { return; }
static configure(options: BackgroundGeolocationConfig): Promise<any> { return; }

/**
* Turn ON the background-geolocation system.
Expand All @@ -392,9 +390,10 @@ export class BackgroundGeolocation {
/**
* Inform the native plugin that you're finished, the background-task may be completed
* NOTE: IOS, WP only
* @returns {Promise<any>}
*/
@Cordova()
static finish() { }
static finish(): Promise<any> { }

/**
* Force the plugin to enter "moving" or "stationary" state
Expand Down

0 comments on commit fc87992

Please sign in to comment.