-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Typescript 4.1.2 fails with "Cannot find name 'PositionError'" #1646
Comments
I'm running into the same issue. My I also tied adding:
still failing |
I just wonder if maybe this is an issue with TypeScript and not with the types. |
It seems like |
The fix itself is easy, and I would gladly do a PR for it. The issue is backwards compatibility with older versions of Typescript. I did a little research and there doesn't seem to be a good solution to this problem.
Never mind the patch. @ileonovdima 's idea is much better. |
@dovidweisz typesVersions could help here? |
solved the problem by adding in global.d.ts
|
@giogonzo: Cool, I didn't know that was available. (I wonder how it would be implemented)
@ileonovdima: Super cool TYVM I love the way I have that "Contributor" badge here. I literally changed a few characters... Once... IN THE DOCS. LOL |
@dovidweisz basically producing 2 different outputs (e.g. one in lib and one in lib4.1) and applying your patch only on lib4.1 (and pointing TS to the correct folder via that key in package.json) |
HmmmmSeems doable, but I would flip that around. I would:
I'm looking for other projects with the same (or similar) issues. I guess any front end project that is built in Typescript, and uses typesVersions. |
I agree 👍 |
Where should this file go? I tried several places and typescript doesn't seem to pick it up. |
Same here |
I have it working, it's in my /sec file.
…On Fri, Dec 11, 2020, 11:12 AM Valentin Hervieu ***@***.***> wrote:
solved the problem by adding in global.d.ts
Where should this file go? I tried several places and typescript doesn't
seem to pick it up.
Same here
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1646 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABUTPCNJEJ54PA4VSKUITOTSUJAFHANCNFSM4T4P6NRA>
.
|
I'm also getting this with typescript v4.1.3 |
@dovidweisz made a bit overkill the easiest way is to introduce own interface compatible with |
## [15.3.7](v15.3.6...v15.3.7) (2021-01-08) ### Bug Fixes * [#1646](#1646) ([ebc7094](ebc7094))
🎉 This issue has been resolved in version 15.3.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
make own interface that compatible with GeolocationPositionError and PositionError. It is the easiest way to avoid errors in typescript 4.1
## [15.3.7](streamich/react-use@v15.3.6...v15.3.7) (2021-01-08) ### Bug Fixes * [streamich#1646](streamich#1646) ([ebc7094](streamich@ebc7094))
make own interface that compatible with GeolocationPositionError and PositionError. It is the easiest way to avoid errors in typescript 4.1
## [15.3.7](streamich/react-use@v15.3.6...v15.3.7) (2021-01-08) ### Bug Fixes * [streamich#1646](streamich#1646) ([ebc7094](streamich@ebc7094))
What is the current behavior?
I've got an error
react-use: 15.3.4
typescript: 4.1.2
The text was updated successfully, but these errors were encountered: