geoman-io / leaflet-geoman

🍂🗺️ The most powerful leaflet plugin for drawing and editing geometry layers
https://geoman.io
MIT License
2.21k stars 433 forks source link

Can't find @types geoman-io/leaflet-geoman-free #659

Closed pherry-art closed 3 years ago

pherry-art commented 4 years ago

Hi, leaflet-geoman is a great library. Is it possible for you to provide @types/leaflet-geoman and index.d.ts? I think more developers will be able to use it.

codeofsumit commented 4 years ago

I'm not a typescript user myself so I don't think my attempt on this would be sufficient - but any PRs are welcome. Is there anything you would need from us in order to create the types?

ryan-morris commented 4 years ago

I have some basic typings I have been using internally for a few months now. I have created a PR #678 for this. I looked at adding auto generation, but without the right docs/annotations a lot of the suggested parameter values, such as layer.on('pm:edit' do not suggest any values. This makes it a more manual process to keep up to date but I can help maintain this as things are added or removed. Hopefully having something in place will invite others to make it more comprehensive, since it's easier to just update a file and submit a new PR.

I think I put everything needed in place... the key things are the leaflet-geoman.d.ts file being included, and the "types": in package.json .