ng-web-apis / geolocation

An Observable based abstraction to use Geolocation API with Angular
https://ng-web-apis.github.io/geolocation
MIT License
119 stars 10 forks source link

[BUG] Cannot find name "Position" or "Coordinates" #19

Closed acadianaapps closed 3 years ago

acadianaapps commented 3 years ago

🐞 Bug report

Description

Cannot find name "Position"

image

Reproduction

This error just surfaced the other day. I have the common library installed also.

Expected behavior

Expect Position and Coordinates types to be supplied with library

Versions

Additional context

Unable to find where the Position and Coordinates types are or should be supplied from.

Thanks for fantastic libraries

MarsiBarsi commented 3 years ago

Hey 👋

Thank you for your interest in our library!

What version of TypeScript do you have? Do you use SSR?

acadianaapps commented 3 years ago

Currently have 4.1.3. I also tried rolling back to 4.0.5 with same result.
Do NOT use SSR

"dependencies": { "@angular/animations": "~11.1.2", "@angular/cdk": "^11.1.1", "@angular/common": "~11.1.2", "@angular/compiler": "~11.1.2", "@angular/core": "~11.1.2", "@angular/fire": "^6.1.4", "@angular/flex-layout": "^11.0.0-beta.33", "@angular/forms": "~11.1.2", "@angular/material": "^11.1.1", "@angular/platform-browser": "~11.1.2", "@angular/platform-browser-dynamic": "~11.1.2", "@angular/router": "~11.1.2", "@ng-web-apis/common": "^1.9.0", "@ng-web-apis/geolocation": "^1.0.3", "@ngxs-labs/firestore-plugin": "^0.1.28", "@ngxs/form-plugin": "^3.7.1", "@ngxs/router-plugin": "^3.7.1", "@ngxs/storage-plugin": "^3.7.1", "@ngxs/store": "^3.7.1", "@sentry/angular": "^6.0.4", "@sentry/tracing": "^6.0.4", "@turf/bbox": "^6.3.0", "firebase": "^8.2.5", "immer": "^8.0.1", "lodash": "^4.17.20", "moment": "^2.29.1", "ngx-sub-form": "^5.1.2", "rxfire": "^4.0.0", "rxjs": "~6.6.3", "tslib": "^2.1.0", "txml": "^4.0.1", "zone.js": "~0.11.3" }, "devDependencies": { "@angular-devkit/build-angular": "^0.1101.2", "@angular/cli": "~11.1.2", "@angular/compiler-cli": "~11.1.2", "@angular/language-service": "^11.1.2", "@ngxs/devtools-plugin": "^3.7.1", "@ngxs/logger-plugin": "^3.7.1", "@semantic-release/changelog": "^5.0.1", "@semantic-release/git": "^9.0.0", "@turf/turf": "^6.3.0", "@types/jasmine": "~3.6.3", "@types/jasminewd2": "~2.0.8", "@types/lodash": "^4.14.168", "@types/node": "^14.14.25", "codelyzer": "^6.0.1", "firebase-tools": "^9.3.0", "fuzzy": "^0.1.3", "inquirer": "^7.3.3", "inquirer-autocomplete-prompt": "^1.3.0", "jasmine-core": "~3.6.0", "jasmine-spec-reporter": "~6.0.0", "karma": "~6.1.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~3.0.3", "karma-jasmine": "~4.0.1", "karma-jasmine-html-reporter": "^1.5.4", "open": "^7.4.0", "protractor": "~7.0.0", "ts-node": "~9.1.1", "tslint": "~6.1.3", "typescript": "~4.1.3" }

MarsiBarsi commented 3 years ago

It is weird 👀 Position and Coordinates are not our interfaces, they were included in default DOM types, but now I see that it is called GeolocationPosition. We'll research it in the recent days

waterplea commented 3 years ago

Could be a TS 4 breaking change. I wonder if we can work around it by referencing the type indirectly.