Programming languages: Microsoft TypeScript leaps ahead of C#, PHP and C++ on GitHub

New figures show Microsoft's TypeScript has rapidly become an essential programming language for web developers.
Written by Liam Tung, Contributing Writer

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.  


TypeScript has climbed from outside GitHub's rankings in 2016 to seventh place in 2018 and now ranks fourth, eclipsing C#, PHP and C++.  

Image: GitHub

More on Microsoft's TypeScript and programming languages

  • Programming language TypeScript 4.1 beta: These are the new features, says Microsoft  
  • TypeScript creator: How the programming language beat Microsoft's open-source fears  
  • Microsoft: VS Code update gets new features with programming language TypeScript 4.0
  • Microsoft's TypeScript 4.0 programming language arrives: It's a big milestone
  • Microsoft to developers: These are our biggest and best open-source projects
  • Microsoft: This new update makes VS Code friendlier for Java programming language jobs
  • Microsoft VS Code turns 5: How GitHub, open source, Google made it a hit, reveals creator
  • JavaScript creator Eich: My take on 20 years of the world's top programming language
  • Microsoft lead engineer: Programming language TypeScript took off thanks to Google's Angular
  • Deno 1.0: Node.js makers have new JavaScript runtime for TypeScript programming language
  • Programming language TypeScript 3.9 cuts compile times by up to 40%, says Microsoft
  • JavaScript programming language developers: This is Kite's new free AI code-completion tool
  • Programming languages: Kotlin rises fastest but JavaScript lures millions more developers
  • New programming language rankings: Python now as popular as Java, as TypeScript climbs
  • These are the top JavaScript libraries and frameworks
  • Programming languages: Why JavaScript developers are choosing TypeScript
  • Who built Microsoft TypeScript and why  
  • Editorial standards