TypeScript's position in front-end development is no longer contested. More than a decade after Microsoft introduced the language in 2012, it has become central to the developer experience by most public measures. TypeScript extends JavaScript by adding syntax for type declarations, classes, and other object-oriented constructs, and its compiler uses that syntax to catch errors before they ship, emitting plain JavaScript that browsers can execute. The project is maintained by Microsoft and released under the Apache 2 license.

The relevance of TypeScript illustrated in a line chart showing the popularity of multiple languages since 2014. TypeScript's popularity has risen the fastest among 10 popular languages and ranks fourth overall.
Source: State of the Octoverse 2021 (GitHub)

The surge is recent: TypeScript only began its steep climb around 2017. By early 2022 it was the fourth most popular language in GitHub's rankings. The open question is not whether TypeScript matters now, but whether that trajectory can continue.

Where the language comes from

Understanding TypeScript's future requires knowing its base. TypeScript is a strict superset of ECMAScript 2015, so JavaScript syntax is also TypeScript syntax, and a TypeScript program can consume JavaScript without extra work. It also tracks the ECMAScript standard maintained by ECMA International, whose twelfth edition, ECMAScript 2021, was published in June 2021.

Concentric circles in blue, orange, green, and magenta showing how TypeScript encompasses ES 2016, ES 2015, and ES 5.
Credit: Seema Saharan

Three parts that carry the language

TypeScript's usefulness rests on three pieces: the language itself with its type-checking, the compiler, and the language service.

A tree chart showing TypeScript at the top with three branches representing its language, compiler, and language service. Each of those has a single branch explaining what those components do.

The language is what developers write; the compiler translates it for browsers; the service processes it on demand. Editor support completes the set. TypeScript began life only in Microsoft's Visual Studio, but it is now available nearly everywhere: Atom, Sublime Text, WebStorm, Emacs, NetBeans, Eclipse, and NeoVim all support it, natively or through plugins. Easy access across editors broadens the pool of developers who can adopt it.

What each major version added

The release history shows steady accumulation of capability:

  • TypeScript 1.6 introduced the .tsx file extension, which enabled JSX inside TypeScript files, and made the as operator the default way to cast.
  • TypeScript 2 allowed developers to optionally prevent variables from being assigned null.
  • Version 2.3 added support for ES6 features such as generators and iterators.
  • TypeScript 3 brought tuples into REST parameters and spread expressions.
  • TypeScript 4, at version 4.5.2 when this was written, refined tuples and template literal types, improved type alias preservation, and made changes to Awaited and Promise.

How the surveys rank it

Independent measurements broadly agree on TypeScript's standing, even where the underlying methods differ.

Analyst and index data

RedMonk placed TypeScript eighth in its 2021 language rankings, and its commentary noted that the gap to the fifth-place languages had narrowed from six points a year earlier to two. The firm cautioned that past performance does not guarantee future performance, while suggesting TypeScript may still have room to grow. The PYPL Index, which tracks Google searches for language tutorials, ranked TypeScript eighth as well, with interest trending flat year-over-year while Python and C++ trended up.

Developer surveys

Stack Overflow's 2021 Developer Survey, drawing on roughly 83,000 respondents, ranked TypeScript the seventh most popular language. It also placed second among technologies developers most want to work with (after Python) and third among most loved languages (behind Rust and Clojure).

Source: Stack Overflow Developer Survey 2021

The 2020 State of JavaScript survey reported a 93% satisfaction rate, up from 89% in 2019 and the highest in the rankings. TypeScript also led on interest (70%, up from 66%), usage (78%, up from 66%), and awareness (100%, unchanged from 2019).

Screenshot of the 2021 State of JavaScript survey chart of popular JavaScript flavors. TypeScript was second in 2016 but took first place in 2017 and has remained there since, above PostScript, Reason, Elm, and ClojureScript.

GitHut 2.0, which analyzes language use across GitHub, saw TypeScript move from seventh in the first quarter of 2021 to fourth in the fourth quarter, with the largest year-over-year change of any language.

Showing TypeScript ranking seventh in a data table.
Source

The roadmap ahead

The official roadmap is the best available signal of where the language is heading. It lists typeof class changes, more code permitted before super calls in subclasses, generalized index signatures, --noImplicitOverride and the override keyword, static index signatures, unknown as the type for catch clause variables, investigation of nominal typing, flattening declarations, the ES decorator proposal, investigation of ambient, deprecated, and conditional decorators, partial type argument inference, a quick fix that scaffolds local @types packages, decorators for function expressions and arrow functions, and—perhaps least expected—an investigation into error messages written in haiku or iambic pentameter.

A few items stand out for front-end work.

Flattening declarations

The flattening declarations proposal would let a library be consumed through a single TypeScript file no matter how many modules it contains internally. The compiler would emit one amalgamated, flattened .d.ts alongside a single output .js file, respecting access modifiers when generating the declaration. Developer experience and long-term maintainability both benefit.

Decorators, including ambient and conditional variants

Decorators attach annotations and metadata to existing code declaratively. Each carries an @ name that never reaches the emitted JavaScript but can persist in .d.ts outputs. Ambient and conditional decorators would formalize design-time behavior—one illustration being a warning when someone calls a deprecated method or property and should move to a newer library version. Separately, decorators for function expressions and arrow functions would expose runtime information about the decorated expression.

The haiku item

My code is breaking
Ignore this error message
Everything is good
#TSConf

— Nick Nisi (@nicknisi) March 13, 2018

This one contributes personality rather than capability, and it has seen no progress in the two years before early 2022—but it remains on the roadmap, meaning someone will eventually take it on.

Tooling beyond the compiler

Microsoft's tooling is moving with the language. Visual Studio 2022 Preview 3, released in August 2021, added JavaScript and TypeScript tools aimed at single-page applications and front-end development, a new JavaScript/TypeScript project type for standalone Angular, React, and Vue projects, and templates that build on each framework's native CLIs. Taken together, the language's growth and the surrounding tooling point to the same conclusion: TypeScript is relevant in 2022, and its momentum gives no sign of stalling yet.