fix(geolocation): fix watchPosition return type

closes #741
This commit is contained in:
Ibby 2016-10-27 08:09:36 -04:00
parent c98b4f4c85
commit d5310b0f73

View File

@ -174,7 +174,7 @@ export class Geolocation {
* @param {GeolocationOptions} options The [geolocation options](https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions).
* @return Returns an Observable that notifies with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or errors.
*/
static watchPosition(options?: GeolocationOptions): Observable<Geoposition | PositionError> {
static watchPosition(options?: GeolocationOptions): Observable<Geoposition & PositionError> {
return new Observable<Geoposition>(
(observer: any) => {
let watchId = navigator.geolocation.watchPosition(observer.next.bind(observer), observer.next.bind(observer), options);