Skip to content
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

Fixing type import #189

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fixing type import #189

wants to merge 1 commit into from

Conversation

robinmolen
Copy link

Import EditOptions directly from 'leaflet' results into a "Cannot use namespace EditOptions as a type" error.

To fix this i have changed the EditOptions import with Control, and using the Control.EditOptions to get the real type definition. In "@types/leaflet-draw" EditOptions is defined as namespace describing a completely different functionality.

Seeing how this project is a extension/implementation of leaflet-draw as a React component, it only makes sense that the types definitions of leaflet-draw are added as dependency.

Import `EditOptions` directly from 'leaflet' results into a "Cannot use namespace EditOptions as a type" error.
robinmolen added a commit to open-formulieren/formio-builder that referenced this pull request Jan 14, 2025
…t error

The react-leaflet-draw throws an error when building the project. To supress this error, `"skipLibCheck": true` has been added to the tsconfig.json.

I've made a PR to react-leaflet-draw to fix this issue (alex3165/react-leaflet-draw#189).

When the typescript issue is resolved, the `"skipLibCheck": true` config should be removed from the tsconfig.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant