shashwatak / satellite-js

Modular set of functions for SGP4 and SDP4 propagation of TLEs.
MIT License
911 stars 145 forks source link

Add TypeScript Definitions #71

Closed kylegmaxwell closed 4 years ago

kylegmaxwell commented 4 years ago

Hi, Thank you for the great library. I am trying to use satellite.js in TypeScript which requires type definitions for the TypeScript compiler. I got it working locally, but would like to share the definitions so others can use your library in TypeScript as well.

I followed the contribution directions, except that I had to fork instead of branch since I don't expect to have write access to your repository.

I also updated the change log and version as directed by the contributions guide, but if that is something that you prefer to mange I can remove that from this pull request.

I can also attach my test file which may help you see how this can be used in TypeScript with Jest. The test file is just for reference since I did not add TypeScript to your package dependencies, since that seemed like too much of a change. satellite.test.ts.txt

Let me know what you think. Thanks, Kyle

ezze commented 4 years ago

@kylegmaxwell, thanks for your contribution. Try it out in 4.1.0.

kylegmaxwell commented 4 years ago

I tried it out with 4.1.1 and it works great for our use case, thanks for accepting it and catching those documentation updates.