modern JavaScript + types. It's about catching bugs early and making you a more efficient developer, while at the same time leveraging the JavaScript community.
typing • Compiles to different ECMAScript standards (ES3, ES5, ES2015) • Compatible with JavaScript (it’s superset of JavaScript) • Latest ECMAScript features (arrow functions, classes, spread operator...) • Great support, tools and community
specification with many features like: ◦ Function and properties modifiers (public, private, protected, readonly) ◦ Accessors ◦ Abstract classes • Can be mixed (extended) with interfaces
in Java, C++, C# • Very powerful for creating advanced structures • Can be used with pretty much every TypeScript language construction (functions, types, interfaces, classes etc.)
Add proper flags to config • New modules - write in TypeScript • Old modules: ◦ If time > 0: migrate incrementally ◦ If time <= 0: add only typings to current JavaScript (to use it inside TypeScript code)
typings from JavaScript libraries (if written by author) • Using typings from central repo of types (DefinitelyTyped) • Writing needed typings inside our application
predictable code • Much less bugs on production • Supports older browsers • Lots of configuration options • Easy migration from JavaScript • Great integration with IDE (VS Code, JetBrains)
only if we are “strict” • Basically new language to learn • Compilation step • Cannot catch 100% of bugs (it’s only static types) • Not every JavaScript library has typings