{
  "id": "typescript",
  "name": "TypeScript",
  "appeared": 2012,
  "creators": [
    "Anders Hejlsberg"
  ],
  "org": "Microsoft",
  "type": "web",
  "status": "alive",
  "tagline": "Static types for JavaScript code, removed at compile time so the output is plain JavaScript.",
  "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.",
  "reacts_to": [
    "javascript"
  ],
  "tradeoffs": {
    "memory": "gc",
    "types": "static",
    "run": "to-js",
    "concurrency": [
      "async"
    ],
    "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."
  },
  "slots": [
    {
      "slot": "browser",
      "fit": "strong",
      "note": "Compiles to JavaScript, so it runs wherever JavaScript does."
    },
    {
      "slot": "server",
      "fit": "ok",
      "note": "Runs on Node.js after compilation."
    },
    {
      "slot": "cli",
      "fit": "ok"
    },
    {
      "slot": "embedded",
      "fit": "none",
      "note": "It compiles to JavaScript, so it needs a JavaScript runtime that microcontrollers do not have."
    }
  ],
  "won_where": [
    {
      "what": "Angular 2 announced as built with TypeScript in March 2015",
      "source": "https://devblogs.microsoft.com/typescript/angular-2-built-on-typescript/"
    },
    {
      "what": "Slack's desktop app ported to TypeScript, which Slack called a boon to stability",
      "source": "https://slack.engineering/typescript-at-slack/"
    },
    {
      "what": "Airbnb's frontend, 86 % converted to TypeScript (about 6 million lines) by August 2020",
      "source": "https://www.infoq.com/news/2020/08/airbnb-typescript-migration"
    },
    {
      "what": "67 % of State of JS 2024 respondents wrote more TypeScript than JavaScript",
      "source": "https://2024.stateofjs.com/en-US/usage/"
    }
  ],
  "alternatives": [
    "javascript",
    "dart",
    "go"
  ],
  "timeline": [
    {
      "year": 2012,
      "what": "Microsoft previews TypeScript, a JavaScript-like language that compiles to JavaScript",
      "source": "https://techcrunch.com/2012/10/01/microsoft-previews-new-javascript-like-programming-language-typescript/"
    },
    {
      "year": 2014,
      "what": "TypeScript 1.0 is announced on April 2",
      "source": "https://devblogs.microsoft.com/typescript/announcing-typescript-1-0/"
    },
    {
      "year": 2015,
      "what": "Angular 2 is announced as built with TypeScript on March 5",
      "source": "https://devblogs.microsoft.com/typescript/angular-2-built-on-typescript/"
    },
    {
      "year": 2017,
      "what": "Slack publishes how it moved its desktop app to TypeScript",
      "source": "https://slack.engineering/typescript-at-slack/"
    },
    {
      "year": 2023,
      "what": "TypeScript 5.0 is released, aiming to make TypeScript smaller, simpler and faster",
      "source": "https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/"
    }
  ],
  "links": {
    "website": "https://www.typescriptlang.org/",
    "repo": "https://github.com/microsoft/TypeScript",
    "docs": "https://www.typescriptlang.org/docs/"
  },
  "pldb": "typescript",
  "sources": [
    "https://techcrunch.com/2012/10/01/microsoft-previews-new-javascript-like-programming-language-typescript/",
    "https://www.theregister.com/software/2012/11/03/microsoft-typescript-isnt-a-javascript-killer/717785",
    "https://devblogs.microsoft.com/typescript/announcing-typescript-1-0/",
    "https://devblogs.microsoft.com/typescript/angular-2-built-on-typescript/",
    "https://slack.engineering/typescript-at-slack/",
    "https://www.infoq.com/news/2020/08/airbnb-typescript-migration",
    "https://2024.stateofjs.com/en-US/usage/",
    "https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/",
    "https://survey.stackoverflow.co/2025/technology/",
    "https://www.typescriptlang.org/"
  ],
  "verified": false,
  "last_reviewed": "2026-10-30",
  "prose": "## Why it exists\n\nIn October 2012 Microsoft previewed TypeScript, a JavaScript-like language that compiles to plain JavaScript ([TechCrunch](https://techcrunch.com/2012/10/01/microsoft-previews-new-javascript-like-programming-language-typescript/)). 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](https://www.theregister.com/software/2012/11/03/microsoft-typescript-isnt-a-javascript-killer/717785)). The answer was to build on JavaScript rather than replace it: any valid JavaScript is also valid TypeScript, so existing code kept working.\n\n## What it trades away\n\nTypeScript 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](https://www.typescriptlang.org/)), and the price of that tooling is the extra layer.\n\n## Where it won\n\nAngular 2 was announced as built with TypeScript in March 2015 ([Microsoft TypeScript blog](https://devblogs.microsoft.com/typescript/angular-2-built-on-typescript/)). Slack moved its desktop app to TypeScript and wrote that TypeScript \"was such a boon to our stability and sanity\" ([Slack Engineering](https://slack.engineering/typescript-at-slack/)). Airbnb's migration had converted 86 % of its frontend, about 6 million lines, by August 2020 ([InfoQ](https://www.infoq.com/news/2020/08/airbnb-typescript-migration)). In the 2024 State of JavaScript survey, 67 % of respondents said they wrote more TypeScript than JavaScript ([State of JS](https://2024.stateofjs.com/en-US/usage/)). In the 2025 Stack Overflow survey, 43.6 % of respondents used it ([Stack Overflow](https://survey.stackoverflow.co/2025/technology/)).",
  "url": "https://langwhy.dev/lang/typescript/",
  "markdown": "https://langwhy.dev/lang/typescript.md",
  "license": "CC0-1.0"
}