12 Interesting Things About TypeScript
*.js file and switch it to a
--target compiler option that you want, starting with the ECMAScript 3 standard. You can even choose
ESNext, which will target the latest proposed language features from the ECMAScript committee.
The advantage here is that you can use all the modern language features of TypeScript in your applications, but you can still target and support older browsers. That’s pretty cool.
3. TypeScript Is Popular
Many, many developers are taking advantage of TypeScript’s features, including Angular developers and lots of folks that use StackOverflow. TypeScript cracked the Top 10 in the most recent StackOverflow Developer Survey — up from the previous year. It’s now the seventh-most used language on Github. TypeScript is widely used, growing, and here to stay.
4. TypeScript Is Open-Source
The TypeScript compiler and accompanying code is a project on GitHub. There are over 7,300 forks of the project. Over 53,000 developers have starred it, and over 1.4 million projects use it. (All of that lends credence to the above point about popularity.) It’s released under the Apache 2.0 License.
Want to see exactly how the compiler works? Want to fork the project and fix a bug? You can. Pull-requests are open. It’s as open-source as it gets.
And because of all the community support, TypeScript moves quickly to support all the latest language features and trends.
5. TypeScript Is Led by Anders Hejlsberg and Backed by Microsoft
For folks like me that have been around a while, this may be the most fantastic bullet point of all. Microsoft has embraced the open-source culture, and TypeScript is just one manifestation of that trend.
And for an old Delphi developer like me, it’s great to see Anders Hejlsberg working on another fun language project. (Anders was the original designer of Turbo Pascal and Delphi). He’s quite well known for several large projects, including the C# language and much of the early .Net Framework. Anders leads the TypeScript project and is an active part of the open-source process. It’s fun to see him commenting and approving pull requests and such.
7. TypeScript Is Strongly Typed
TypeScript provides types and a compiler that enforces those types. Typing allows you to keep everything where it should be and prevents things from getting improperly assigned. No more chasing down bugs from weakly-typed assignments. No more passing improperly typed parameters. TypeScript can provide coding-time and compile-time error checking. The debate about strong vs. weak typing is real, but at least with TypeScript, you can choose.
8. TypeScript Provides a Complete Tooling Experience
Another strong reason that TypeScript was created was to give the powerful code-time experience that typing allows. Strong typing allows code editors to easily provide IntelliSense-like features, refactoring, and other code-based features. All that tooling means that the editor can immediately point out coding errors to you, and they can even provide fixes for those problems. All these editor features can drastically improve coding efficiency and the cleanness of your code.
9. TypeScript Provides All the Modern Language Features
10. TypeScript Is Battle-Tested
TypeScript has proven itself worthy in any number of substantial projects. Of course, the TypeScript compiler itself is written in TypeScript. The web framework Angular is written in TypeScript. Many large, public-facing Google properties are written in Angular (Google sponsors the open-source Angular project). Visual Studio Code is written in TypeScript. So is Slack. TypeScript is up to the challenge.
11. TypeScript Is Free to Innovate
12. TypeScript Is Easy for C# and Java Developers to Understand