gkjohnson / three-bvh-csg

A flexible, memory compact, fast and dynamic CSG implementation on top of three-mesh-bvh
MIT License
552 stars 45 forks source link

Add Typescript Type Definition #65

Closed kirevdokimov closed 1 year ago

kirevdokimov commented 1 year ago

People use typed javascript very often

AngyDev commented 1 year ago

Hi @gkjohnson, maybe it is a good issue to start, to know how the code work, what do you think? How did you think to do it? Migrate from JS to Typescript or in another way?

gkjohnson commented 1 year ago

@AngyDev I think this would be great! I'd prefer to just add manually maintained d.ts files to start that cover the public API for the project. Given how thin the documented API is at the moment I think it can all fit into just a single index.d.ts file at the root of /src. But if you want to make sibling files for the important classes I'll leave that up to you. I don't have strong opinions there at the moment.

Here's an example of how its been done in another project I maintain:

https://github.com/gkjohnson/urdf-loaders/tree/master/javascript/src

AngyDev commented 1 year ago

Thanks, I'll check the example and I'll start to try something when I'll arrive at a point I can do a WIP PR to check together if it is correct, is it ok for you?

gkjohnson commented 1 year ago

Closed with #71