-
Notifications
You must be signed in to change notification settings - Fork 101
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 types file #319
Comments
Hey @gavinr |
Sorry @nooras I just found out that @gavinr was out of the office last week. Let me ping @patrickarlt & @cyatteau |
It is not necessary for you to be assigned in order for you to work on this task - please feel to go ahead and work on it! Just fork the repo, create a branch, make the changes in that branch, and then send a PR back to this repo.
I think it would be types for any of the pubic APIs, i.e. what is listed here: https://github.com/Esri/esri-leaflet-geocoder?tab=readme-ov-file#api-reference |
Is @nooras assigned to this? I don't want to pick up an issue if someone is already on it. |
Hey @kimmykokonut I am working on it. Thanks |
hey @gavinr-maps, @hhkaos |
@gavinr-maps |
I'm trying to test, but I'm not as familiar as I should be with TypeScript these days.... So I'm going to defer to @gavinr-maps 😅 |
@hhkaos I have added replication steps to the original issue above. |
This comment was marked as outdated.
This comment was marked as outdated.
@nooras, just FYI, I just checked with @gavinr-maps on a call, and the issue on my side was that I had @types/esri-leaflet-geocoder installed globally; that's why I didn't have that issue 😅. So you can proceed with his instructions Thanks! |
Problem
As a follow-up from #259 and #318 (comment), it seems like the TypeScript types at https://www.npmjs.com/package/@types/esri-leaflet are ok but not working in certain situations.
Solution
We should publish our own typescript types file within this repo, like we did within Esri/esri-leaflet-vector#114
Replication Steps
npm create vite@latest test-esri-leaflet-geocoder -- --template vanilla-ts cd test-esri-leaflet-geocoder npm install npm install leaflet npm i --save-dev @types/leaflet npm install esri-leaflet-vector npm install esri-leaflet-geocoder npm run dev
src/style.css
:REPLACE the file
src/main.ts
with this:npm i --save-dev @types/esri-leaflet-geocoder
if it exists or add a new declaration (.d.ts) file containingdeclare module 'esri-leaflet-geocoder';
ts(7016)The text was updated successfully, but these errors were encountered: