langwhy

TypeScript

Web· alive, actively evolving· since 2012 · Anders Hejlsberg · Microsoft

Static types for JavaScript code, removed at compile time so the output is plain JavaScript.

Draft from 2026-10-30, not yet checked claim by claim against its sources. Help verify it.

Born from

In October 2012 Microsoft previewed TypeScript, a JavaScript-like language that compiles to plain JavaScript. Anders Hejlsberg argued that building large JavaScript applications successfully was simply too difficult, and that JavaScript's dynamic type system made it impossible to build an IDE like Visual Studio that worked with it. The language was built to add types on top of JavaScript, so any valid JavaScript is also valid TypeScript.

What it trades away

garbage collectedmemory
static typestypes
compiles to JavaScriptruns as
asyncconcurrency

Cost: Types exist only at compile time, so a value from a server or a user can break a type at run time, and every project keeps a compile step to maintain.

Where it fits

SlotFit
browser●●●Compiles to JavaScript, so it runs wherever JavaScript does.
server●●○Runs on Node.js after compilation.
cli●●○
embedded○○○It compiles to JavaScript, so it needs a JavaScript runtime that microcontrollers do not have.

Why it exists

In October 2012 Microsoft previewed TypeScript, a JavaScript-like language that compiles to plain JavaScript (TechCrunch). Anders Hejlsberg argued that building large JavaScript applications successfully was simply too difficult. He also said JavaScript’s dynamic type system made it impossible to build an IDE like Visual Studio that worked with it (The Register). The answer was to build on JavaScript rather than replace it: any valid JavaScript is also valid TypeScript, so existing code kept working.

What it trades away

TypeScript adds a compile step and a second layer that has to stay in step with the code. Its types exist only at compile time, so data that arrives from a server or a user is untyped until a check runs, and the checks cover only the code the compiler sees. Projects must keep the compiler, the configuration and the type declarations for their libraries up to date. The project describes itself as a language that “builds on JavaScript, giving you better tooling at any scale” (TypeScript), and the price of that tooling is the extra layer.

Where it won

Angular 2 was announced as built with TypeScript in March 2015 (Microsoft TypeScript blog). Slack moved its desktop app to TypeScript and wrote that TypeScript “was such a boon to our stability and sanity” (Slack Engineering). Airbnb’s migration had converted 86 % of its frontend, about 6 million lines, by August 2020 (InfoQ). In the 2024 State of JavaScript survey, 67 % of respondents said they wrote more TypeScript than JavaScript (State of JS). In the 2025 Stack Overflow survey, 43.6 % of respondents used it (Stack Overflow).

Named wins

Evolution

Reacts to: JavaScript

Weigh it against: JavaScript, Dart, Go

Timeline

Links

website · repo · docs · PLDB

Sources

  1. https://techcrunch.com/2012/10/01/microsoft-previews-new-javascript-like-programming-language-typescript/
  2. https://www.theregister.com/software/2012/11/03/microsoft-typescript-isnt-a-javascript-killer/717785
  3. https://devblogs.microsoft.com/typescript/announcing-typescript-1-0/
  4. https://devblogs.microsoft.com/typescript/angular-2-built-on-typescript/
  5. https://slack.engineering/typescript-at-slack/
  6. https://www.infoq.com/news/2020/08/airbnb-typescript-migration
  7. https://2024.stateofjs.com/en-US/usage/
  8. https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/
  9. https://survey.stackoverflow.co/2025/technology/
  10. https://www.typescriptlang.org/

Unverified draft, 2026-10-30.Edit the facts · edit the story · JSON · Markdown