Skip to content

Commit

Permalink
fix(geolocation): #3303 geolocation watchPosition return type (#3470)
Browse files Browse the repository at this point in the history
* fix #3303 geolocation watchPosition return type

* watchPosition align docs
  • Loading branch information
DavidWiesner authored Aug 14, 2020
1 parent b0ffb0e commit 579170a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/@ionic-native/plugins/geolocation/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ export class Geolocation extends IonicNativePlugin {
* ```
*
* @param {GeolocationOptions} options The [geolocation options](https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions).
* @returns {Observable<Geoposition>} Returns an Observable that notifies with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or errors.
* @returns {Observable<Geoposition | PositionError>} Returns an Observable that notifies with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or errors.
*/
watchPosition(options?: GeolocationOptions): Observable<Geoposition> {
return new Observable<Geoposition>((observer: any) => {
watchPosition(options?: GeolocationOptions): Observable<Geoposition | PositionError> {
return new Observable<Geoposition | PositionError>((observer: any) => {
const watchId = navigator.geolocation.watchPosition(
observer.next.bind(observer),
observer.next.bind(observer),
Expand Down

0 comments on commit 579170a

Please sign in to comment.