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

TypeScript Typings #223

Closed themre closed 6 years ago

themre commented 7 years ago

i'm no TS expert but I would love some TS typings in my VSCode that works nicely with them. I can make initial PR and try to build types, but it would be nice if someone else also has some knowledge of it.

themre commented 7 years ago

Also we can add flow typing as well.

codeofsumit commented 7 years ago

@themre I'm not using TypeScript nor Flow but I also have no problem with them being added for TS/Flow users. Would welcome a PR but I agree with you that at least a second TS user should look over them.

raulrios commented 7 years ago

Have you tried this? https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/leaflet.pm

The only thing is that it doesn't support latest leaflet.pm versions (it currently supports version 0.13).

hoeck commented 6 years ago

I'm currently using leaflet 1.2 and leaflet.pm 0.22 in a Typescript project.

The DefinitelyTyped typings do not work for me, @raulrios, though it may be because I've got a weird setup with two versions of Leaflet at a time. Also, having typings directly in the repository is preferred over adding them to DefinitelyTyped.

Anyway, I'd be happy to help with reviewing & testing any PRs regarding TS typings @themre.

themre commented 6 years ago

@hoeck thanks for the info, will try to find some time to add typing! thanks also for offering help!

codeofsumit commented 6 years ago

I'm closing this for inactivity now. I'm happy to merge a PR regarding Typescript Typings - I won't add them myself though.