perliedman / leaflet-routing-machine

Control for routing in Leaflet
https://www.liedman.net/leaflet-routing-machine/
Other
1.08k stars 350 forks source link

Add a .d.ts typescript definitions file #461

Closed spaskalev closed 6 years ago

spaskalev commented 6 years ago

I'm using the lrm in a typescript project and having a .d.ts file would be nice. If not planned/in progress, I can try writing one and contributing it.

Regards, Stan

perliedman commented 6 years ago

Hi, I can understand that a typescript definition would be helpful for people who use typescript, but adding it to this repository creates a maintenance problem for me: I don't personally use (or know) TypeScript, so it would not be possible for me to maintain this file, which would in turn cause it to be out of date as soon as I change the API.

My stance is that I'm all for creating those files, but please add them to some external repository; I understand that DefinitelyTyped can be used for this, for example.

perliedman commented 6 years ago

TypeScript definitions for Leaflet Routing Machine have been published on DefinitelyTyped: https://www.npmjs.com/package/@types/leaflet-routing-machine