If you are like me, and hate to work with code that doesn't autocomplete. Fear not because I have been making the groundwork for converting the KEMI Javascript module into Typescript.
All that this does, is to allow for autocomplete, and type correcting, of the code you write.
So far this ONLY works on Jetbrains Webstorm/PHPStorm. If anyone knows a way to get it working on Atom or VSCode, please write to me.
- Tell you if the method is allowed in the current route
- Add JSDoc, with descriptions, return types and examples
- Add enum parameters, for the parameters that e.g. can be a specific set of strings
- Make it work on ATOM & VSCode
I have been testing it out with PHPStorm/Webstorm.
- Clone the repo down to your computer
- Open your kamailio project, and go into settings.
- Find 'Languages & Frameworks > JavaScript > Libraries'
- Add a new Library
- Name the library what you want, and attach the repo to library
As the image proves, it's now possible to autocomplete, and check if the parameters are of the correct type


