-
Notifications
You must be signed in to change notification settings - Fork 154
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
Difficulties with typescript #188
Comments
I think i found a solution for it. I'll try to make a PR later this week |
robinmolen
added a commit
to maykinmedia/react-leaflet-draw
that referenced
this issue
Jan 14, 2025
Import `EditOptions` directly from 'leaflet' results into a "Cannot use namespace EditOptions as a type" error.
I've added a PR: #189. I would like to hear your thoughts |
robinmolen
added a commit
to open-formulieren/formio-builder
that referenced
this issue
Jan 14, 2025
The React-leaflet-draw package seems abandoned. As such, a fix for the typescript issue (alex3165/react-leaflet-draw#188) probably won't happen anytime soon The .patch file, in `/patches`, contains the fix needed for the react-leaflet-draw index.d.ts file. The problem with this solution, is that this only solves it for this project. If we introduce typescript to the SDK (or any other project using `react-leaflet-draw`), this problem will need to be solved again
robinmolen
added a commit
to open-formulieren/formio-builder
that referenced
this issue
Jan 14, 2025
The React-leaflet-draw package seems abandoned. As such, a fix for the typescript issue (alex3165/react-leaflet-draw#188) probably won't happen anytime soon The .patch file, in `/patches`, contains the fix needed for the react-leaflet-draw index.d.ts file. The problem with this solution, is that this only solves it for this project. If we introduce typescript to the SDK (or any other project using `react-leaflet-draw`), this problem will need to be solved again
robinmolen
added a commit
to open-formulieren/formio-builder
that referenced
this issue
Jan 14, 2025
The React-leaflet-draw package seems abandoned. As such, a fix for the typescript issue (alex3165/react-leaflet-draw#188) probably won't happen anytime soon The .patch file, in `/patches`, contains the fix needed for the react-leaflet-draw index.d.ts file. The problem with this solution, is that this only solves it for this project. If we introduce typescript to the SDK (or any other project using `react-leaflet-draw`), this problem will need to be solved again
robinmolen
added a commit
to open-formulieren/formio-builder
that referenced
this issue
Jan 15, 2025
The React-leaflet-draw package seems abandoned. As such, a fix for the typescript issue (alex3165/react-leaflet-draw#188) probably won't happen anytime soon The .patch file, in `/patches`, contains the fix needed for the react-leaflet-draw index.d.ts file. The problem with this solution, is that this only solves it for this project. If we introduce typescript to the SDK (or any other project using `react-leaflet-draw`), this problem will need to be solved again
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hai, im trying to use react-leaflet-draw version
0.20.4
with typescript, but im having some difficulty getting things to work. I'm wondering if you have any suggestions, and if these issues are known.Dependencies
So im working with these packages:
Errors
So im receiving typescript errors for
node_modules/react-leaflet-draw/src/index.d.ts
. Depending on which types dependencies i use, i get different errors:When using the types for leaflet and leaflet-draw
I get this error message
node_modules/react-leaflet-draw/src/index.d.ts:25:9 - error TS2709: Cannot use namespace 'EditOptions' as a type.
With just the leaflet type
I get these error messages
Tried solutions
So i've tried pinning @types/leaflet to the version you use
1.7.11
, but this just results into the previous error messages + a couple extra..Setting
"skipLibCheck": true
in my tsconfig.json does solve it, but i really want to avoid doing this (as it feels a bit to aggressive)The text was updated successfully, but these errors were encountered: