MeeusSunMoon
MeeusSunMoon copied to clipboard
Add TS typings
Closes janrg/MeeusSunMoon#5 Typings closely follow jsdocs and so are quite accurate.
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
- Restrict the type for the moon phase from number to 0 | 1 | 2 | 3
- move the types file from index.d.ts to dist/meeussunmoon.d.ts
- reference the new file location as "types" in package.json ? Thanks!
I guess this and #5 can be closed now?
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.