mapbox / supercluster

A very fast geospatial point clustering library for browsers and Node.
ISC License
2.12k stars 300 forks source link

Add typescript's definition #203

Closed johannchopin closed 1 year ago

johannchopin commented 2 years ago

Hey team 👋

Thanks a lot for the work put on this project that I really enjoy. I would enjoy it even more if there was official TypeScript type definition available. Since rollup is already used, it will be straightforward to add the types directly to the repo https://github.com/rollup/plugins/tree/master/packages/typescript. Another approach would be to add a .d.ts file to DefinitelyTyped.

I can take care of it if you want 👍

What do you think of this idea?

quinn commented 1 year ago

+1 on this. Can authors respond to this? I think 1st class type support should be expected for a commercial product intended to be used in a professional setting.

mourner commented 1 year ago

There are pretty high-quality type definitions maintained at DefinitelyTyped, although I do plan to add official types to the project. https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/supercluster/index.d.ts

quinn commented 1 year ago

Thanks @mourner. Yep, the DefinitelyTyped types are working well for me

johannchopin commented 1 year ago

@mourner Can we add this information to the README so that devs know that the @types/supercluster package is safe?