TypeScript
You can write models in JavaScript. Models run in the browser, and browsers run JavaScript.
You can use plain JavaScript. To build a quality model that does not crash in unexpected situations, use TypeScript.
What is TypeScript?
TypeScript is not a new language. It is an extension of the JavaScript language. When you paste JavaScript code into a TypeScript file, the code is valid TypeScript.
TypeScript lets you add type annotations to your code. These annotations do not change how your code runs. They are notes for you and for the compiler.
The built-in code editor uses these annotations to show the properties of each variable while you type.
The TypeScript compiler also uses type annotations to detect accidental errors.
When the compiler shows errors, you develop faster. The compiler tells you which line is wrong, so you find and fix errors before you or your users test the model. TypeScript prevents a large class of bugs.