roddeh / i18njs

Internationalisation library for JS projects
MIT License
64 stars 17 forks source link

Added TypeScript definitions (#9) #15

Closed entriphy closed 5 years ago

entriphy commented 5 years ago

I made these TypeScript definitions a while ago when I was using this for one of my projects (compiled CoffeeScript doesn't work very well with IntelliSense lol), though I thought they weren't up to my own standards back then :P. I just saw #9 today and thought I might as well fix it up and create a pull request.

This might need a bit of reviewing, as I might've gotten a few types wrong.

EDIT: Forgot that it's i18n.translator.add() (+ all the other functions in the translator class) and not i18n.add(). I'll fix it in a few hours. Fixed.