While programming languages come and go, there’s fresh evidence that rapid growth in the use of TypeScript isn’t tailing off.
When RedMonk looked at the number of pull requests being made to code hosted in public GitHub repositories, it found the number of requests to TypeScript repos spiked in the past three years.
“Pull requests are an indirect measure of community activity and as such this chart is quite something,” says RedMonk co-founder James Governor in his report.
This picture of growing usage is backed up by the star ratings awarded to TypeScript repositories on GitHub, with TypeScript repos sustaining a high star rating, while ratings declined for repos written in other popular newer languages, such as Apple’s Swift and Java alternative Kotlin.
“So what is driving TypeScript growth? One high level answer is that more strongly typed languages – in which you need to define the type of information in a variable up front – are having a renaissance,” says Governor.
Type checking allows developers to spot a class of bugs that could otherwise slip through into software, by running checks ahead of the code being executed that verify various operations, such as whether the data being passed to and from functions is of the correct type. In statically typed languages, developers typically specify the type of a variable or a function parameter when they’re declared, for example, using the keyword int to specify an integer, or str to specify a string of characters, to use two simple examples.
SEE: 10 ways to prevent developer burnout (free PDF) (TechRepublic)
Using static typing not only helps spot certain bugs, but also allows better tooling to be built, which was one of the reasons TypeScript was chosen for the Angular web framework.
“It provides advanced autocompletion, navigation, and refactoring. Having such tools is almost a requirement for large projects,” writes Viktor Savkin, co-founder of Angular consultancy Narwhal Technologies.
TypeScript is even inspiring other languages, with Python creator Guido van Rossum recently telling an audience of developers that Python was learning lessons from TypeScript’s optional type checking.
If you’re interested in finding out more about TypeScript, check out TechRepublic’s round-up of the best free resources for learning the language online.