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

feat: Add typescript definitions #358

Open
wants to merge 2 commits into
base: gh-pages
Choose a base branch
from

Conversation

jeffreykog
Copy link

As suggested in #357 (comment). After this project was made ESM-ready (very nice!) the suggested way of importing this project is not supported in TypeScript because the TS definitions don't exist in this repo, and the ones from DefinitelyTyped still assume the L.Control.Locate global.

Considering the L.Control.Locate global only exists in the UMD bundle but not in the ESM bundle, i chose the approach to default to ESM structure in the TS definitions in this repo. @types/leaflet.locatecontrol will still exist for the possibility to use the L.Control.Locate global in the UMD bundle. This might not be acceptable, so i'm looking for feedback on this. Maybe it is better to support both.

@domoritz domoritz changed the title Add typescript definitions feat: Add typescript definitions Dec 5, 2024
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