stefanocudini / leaflet-search

Search stuff in a Leaflet map
https://opengeo.tech/maps/leaflet-search/
MIT License
772 stars 333 forks source link

Are there TypeScript typings for this project? #304

Open devaskim opened 1 year ago

devaskim commented 1 year ago

I am going to use this awesome project to extend capabilities of map widget implemented in Thingsboard IoT platform. The UI of the platform is Angular project, so there is Typescript. My question is: where I can find TypeScript typings?

stefanocudini commented 1 year ago

leaflet was not written in typescript

devaskim commented 1 year ago

@stefanocudini Sorry, but not a serious answer. Leaflet has official typings or type definitions to use it in Typescript-ed project.

stefanocudini commented 1 year ago

@stefanocudini Sorry, but not a serious answer. Leaflet has official typings or type definitions to use it in Typescript-ed project.

may be it's official for github.com/DefinitelyTyped not for Leaflet organization..

devaskim commented 1 year ago

@stefanocudini Thanks for your time but our discussion is out of scope of original question. I think you agree with me.

Let's start from the beginning

  1. Do you have plans to add Typescripts type definitions for your plugin?
  2. Here is unofficial attempt to create type definitions, but that was a long time ago and I could success with it.

I'm not an experienced Typescript developer to do such job so I decided to ask for help there.

stefanocudini commented 1 year ago
  1. Do you have plans to add Typescripts type definitions for your plugin? no

  2. Here is unofficial attempt to create type definitions, but that was a long time ago and I could success with it.

it sounds interesting but I don't know Typescripts and I have no idea how this works, however the types for the options all seem right: https://github.com/bastisk/leaflet-search-types/blob/master/index.d.ts#L5

stefanocudini commented 1 year ago

I leave the issue open if anyone TP dev wants to contribute with a PR