janrg / MeeusSunMoon

JavaScript module to calculate times for sunrise, solar noon, and sunset, as well as moon phases based on "Astronomical Algorithms" by Jean Meeus
MIT License
31 stars 9 forks source link

Add TS typings #16

Open bisubus opened 4 years ago

bisubus commented 4 years ago

Closes janrg/MeeusSunMoon#5 Typings closely follow jsdocs and so are quite accurate.

janrg commented 4 years ago

Thanks for this. I will actually be releasing v3.0 in the next few months which uses luxon instead of moment and is written entirely in typescript but I guess it's useful to have the typings on 2.x as well. Before I accept the PR, could you

brettz9 commented 4 years ago

I guess this and #5 can be closed now?

janrg commented 4 years ago

I think not everyone will be able or willing to switch to Luxon, e.g. if they have to support obsolete browsers like IE. So I think having typings on a 2.x branch may still be useful, so I won't close this for now.