Microsoft’s superset of JavaScript, TypeScript, has shot up to become the fourth most popular programming language on code collaboration platform, GitHub.
TypeScript’s ascent is tracked in Microsoft-owned GitHub’s 2020 State of the Octoverse report, which has just been published. Before 2016, TypeScript was not a top 10 language in GitHub’s rankings but it climbed to seventh position in 2018 and over the past year has shot up to fourth spot, eclipsing C#, PHP and C++. The top three languages are JavaScript, followed by Python and Java.
TypeScript is an effort from Microsoft to improve JavaScript by introducing a static type system that compiles into JavaScript.
SEE: Hiring Kit: Python developer (TechRepublic Premium)
That type system – which assigns type declarations and annotations to data that makes a program – offers developers a more efficient version of JavaScript that compiles into JavaScript without the type annotations, so that code runs in browsers as pure JavaScript.
Microsoft released TypeScript in 2012 after two years of internal development. The scripting language will turn 10 later in December.
TypeScript’s co-creator Anders Hejlsberg, a Microsoft technical fellow and ‘father of C#’, recently told ZDNet he had to sell the idea of an open-source language to Microsoft’s top brass in 2010, when the company under then CEO Steve Ballmer was still edgy about open source.
James Governor, co-founder of developer analyst firm RedMonk, thinks TypeScript’s surging popularity over recent years is because it satisfies JavaScript developers’ need for “type safety”. Its rise on GitHub suggests that TypeScript is a language that won’t disappear anytime soon.
In mid-2019, TypeScript overtook PHP, which was the third most popular language on GitHub in 2016 but it is now the sixth most commonly used in projects hosted on GitHub.
TypeScript has become popular with web developers with large JavaScript codebases, including Slack, Airbnb and Bloomberg. Microsoft also wrote its popular open-source cross-platform code editor Visual Studio Code in TypeScript.
SEE: Programming languages: Julia users most likely to defect to Python for data science
Google developers behind Angular are fans of TypeScript. The language has also been spurred by the demise of Adobe Flash, which will reach end of life this month and will no longer be supported by any major browser next year.
TypeScript emerged from Microsoft after the Internet Explorer and Edge browsers had already lost the browser wars to Google Chrome, which had the powerful V8 JavaScript engine.
At the same time, HTML5 was happening and developers were building larger JavaScript apps where development tools like automated code-completion could help. Key to TypeScript’s success is support from popular code editors, including JetBrain’s WebStorm, Emacs, and VS Code.
TypeScript has also become essential for Deno, a potential successor to node.js, the ubiquitous runtime for running JavaScript outside a browser. Deno uses Google’s V8 engine and is written in Mozilla-created Rust.