As a superset of JavaScript in general and JavaScript 6 (a.k.a. ECMAScript 2015 or ES6) in particular, TypeScript programming leads to, compared to JavaScript, a more “formal” and therefore controllable code.
TypeScript supports additional programming constructs (e.g., compilation types like
unknown
), which are devoted to (static) type checking (TypeScript compiler). The TypeScript transpiler next erases this extra code so that generated JavaScript code is interpretable by Web browsers on the front-end side or middleware like Node.js, Deno, Bun… on the back-end side.
- Static type checking based on compilation
- Microsoft original contribution with strong influence of C#
- JavaScript code generation with management of language version (ES5, ES6, etc.)
- Plug in JavaScript ecosystem as Node.js dev. dependency component
- Browser-side ( Chrome, Edge, Firefox, Tor…) or server-side (Node.js, Deno, Bun…)
- Recognized standard for, in particular, popular frameworks like Angular or React (
.tsx
suffix)- Native interpretation (Just-In-Time compilation) based on ts-node (online Web interpretation ☛)