TypeScript Soaring in Popularity

Brian Tam
2 min readNov 24, 2018

--

TypeScript has become immensely popular as the 2018 Stack Overflow Developer Survey shows — as it became the 12th Most Popular Programming Language! This is stunning since it is a relatively new language.

Developers love how TypeScript addresses ES6’s type-checking weakness (JavaScript is a loosely typed programming language, meaning it does not require a variable to be defined). As a result, it makes TypeScript developers significantly more efficient since type errors are caught right when the code is written. Additionally, there is good IDE support, which includes the popular IDEs of Visual Studio Code, Eclipse, Sublime, and Atom.

Here is a basic TypeScript example where a type is set on each variable to prevent each variable from being assigned the wrong value type:

If you are accustomed with JavaScript, there is only a slight learning curve to learn TypeScript. By default, TypeScript is optionally typed.

To prevent the function from being called with the wrong types, we have to use a compiler flag: —-noImplicitAny. Now, we have to define the types of the function parameters and the type of the return value. One way we can label these types is through the use of Basic Annotations with :TypeAnnotation syntax:

For the most part, these pros outweigh the cons of a slight learning curve and a little more time spent to set up a codebase. Many developers agree as the Stack Overflow study also shows that TypeScript is ranked the 4th Most Loved Language, 5th Most Wanted Language, 15th Highest Salary in the World and 14th Highest Salary in the United States ($102,000)!

If you are interested in learning more about TypeScript, visit its official website for documentation, guides, and the latest updates!

--

--