-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geolocation.watchPosition() example snippet doesn't compile #741
Comments
thanks |
I'm having the same problem. How do I get the fix? Tnx. |
While using the latest ionic-native __WEBPACK_IMPORTED_MODULE_0_ionic_native__.a.watchPosition(...).filter is not a function So I still remove the filter to get it compiled. |
@dnmd i got the same with 2.2.16, but works with 2.2.15 |
@raae 2.2.16 is the same as 2.2.15 except it has a major fix that is not related to this plugin. You should be using |
@dnmd are you importing |
Ok @ihadeed it now works with 2.2.16, it must have been something else then. |
I'm getting this problem after upgrading ionic-angular from 2.1.0 to 2.2.0 |
@badpenguin thanks, this is because of the Rxjs version. Will push a hotfix soon. |
Geolocation.watchPosition() example code doesn't compile; running
npm run build
throws the following errors:I'm using the latest ionic-app-scripts (v 0.0.36).
It can be reproduced using the snippet given in the docs
A working solution I tried is changing the return type of the watchPosition method from the Union Type
Observable<Geoposition | PositionError>
to the Intersection TypeObservable<Geoposition & PositionError>
.According to the official documentation, in a Union Type, you can only access members that are common to all types in the union; whereas an Intersection Type object will have all the members of all types.
The text was updated successfully, but these errors were encountered: