You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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:
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
"@types/leaflet": "^1.9.16",
I get these error messages
node_modules/react-leaflet-draw/src/index.d.ts:3:2 - error TS2305: Module '"leaflet"' has no exported member 'DrawOptions'.
node_modules/react-leaflet-draw/src/index.d.ts:4:2 - error TS2724: '"leaflet"' has no exported member named 'EditOptions'. Did you mean 'setOptions'?
node_modules/react-leaflet-draw/src/index.d.ts:6:2 - error TS2305: Module '"leaflet"' has no exported member 'DrawEvents'.
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:
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: