Open paul42 opened 6 years ago
@paul42 ,
I am all in favor of organizing the javascript files and making the global variables clearer and you should definitely feel free to do this.
I am not sure it I understand the full benefit of using TypeScript, though. Would this involve adding typescript references to the repo here as well as anything that we would do on our end in terms of using VisualStudio or node.js?
So typescript is almost another language or superset of JavaScript that compiles down to JavaScript. It does introduce some more cognitive overhead and steps to the process, but in my opinion it is compensated by adding type safety and helpful intellisense features in supported ides, providing compile time safety for some errors and typos. I can rig up a demo but most of the setup is done be developers and goes unnoticed by end users.
@paul42 totally agreed. for the further developing, typescript is the way to go. I probably will try to start converting current JS to TS.
Ok, let's do it! I don't have much experience with TypeScript so I will follow your lead here.
While the hackathon was great, and I'm personally wowed by how much the team accomplished, I think for long term support, I could take a pass at a pull request where I was thinking I could try:
combine javascript files slightly differently so that methods that need global variables are just getting them from the method, this would give typescript a much better idea of what variables are passed around, and in addition, this will make the project a bit more robust, where changing a global variable won't break unseen things in another method.
Create and export typescript interfaces/etc. so that maintenance in the future will be easier (if using a typescript enabled IDE (I like visual studio code with plugins)
What are your thoughts?