Development

TypeScript

AI-assisted editorial review:

TypeScript is a programming language from Microsoft that adds a type system to JavaScript. It checks code for type-related mistakes before the code runs, which helps teams keep large web and app codebases maintainable. TypeScript code is converted to plain JavaScript, so the emitted code runs in compatible JavaScript environments.[1]

What does TypeScript mean in simple terms?

In plain JavaScript, some mistakes only show up when the program is already running, for example when a value you expected to be a number turns out to be text. TypeScript lets you write those expectations into the code: "this value is a number" or "this function takes a string." The editor then flags code that breaks those rules before anyone runs it.[1] Microsoft first released TypeScript in October 2012.[2] Today it is used in products such as Slack's desktop app, Airbnb's web frontend, and Microsoft's VS Code editor.[5][6][3] The larger the codebase and the team, the more these checks pay off.[3]

How can TypeScript be explained with an analogy?

If JavaScript is a blank notepad, TypeScript is a form with labelled fields. Filling in a form takes a little more care, but it points out a wrong entry right away instead of after the form has been sent.

Where is TypeScript used?

Case 1

Airbnb — Migrating a large frontend codebase

Airbnb made TypeScript the official language of its frontend web development. To move a mature codebase with thousands of JavaScript files, its engineers built and open-sourced a codemod tool, ts-migrate, which converted projects with more than 50,000 lines of code and over 1,000 files in a single day.[5] Converted code temporarily used placeholder types and ignore comments so it would compile, and engineers then replaced them with precise types over time.[5]
Result: As of August 2020, about 86% of Airbnb's 6-million-line frontend monorepo had been converted to TypeScript (company-reported).[5]

Case 2

Slack — Making a desktop app safer to change

Slack's desktop app passes data between JavaScript, Node.js, and native code, where a small mistake can crash the app. After switching on TypeScript, the team reported being surprised by how many small bugs it found during conversion, and that editor auto-completion immediately improved productivity. It started writing all new code in TypeScript within days, and annotating most of the desktop codebase took about six months.[6] In 2026, Slack engineers told the TypeScript team that TypeScript 7 cut type-checking time in CI from about 7.5 minutes to 1.25 minutes.[4]
Result: Most of the desktop app annotated in about six months; all new code written in TypeScript (company-reported).[6]

Case 3

Microsoft VS Code — An editor built on TypeScript

VS Code is itself a large TypeScript codebase. When the TypeScript team announced its native compiler port in 2025, it measured the VS Code codebase at about 1.5 million lines.[3] With TypeScript 7, a full build of VS Code dropped from 125.7 seconds to 10.6 seconds on the team's test machine, and the time from opening the editor to seeing the first error fell from about 17.5 seconds to under 1.3 seconds.[4]
Result: About 11.9x faster full build of the VS Code codebase with TypeScript 7 (Microsoft benchmark).[4]

Try it today

  1. Open the TypeScript Playground in your browser and type a few lines of JavaScript to see which mistakes it flags.[1]
  2. In an existing JavaScript project, add // @ts-check to the top of one file. You get editor warnings without converting anything.[1]
  3. For a new web project, start with create-next-app, which sets up TypeScript automatically. New React Native apps also start in TypeScript.[8][7]
  4. Keep strict mode on. It is the default from TypeScript 6.0 and 7.0 onward, and it catches more mistakes.[4]
  5. When an AI coding tool writes code for you, ask for TypeScript with explicit types and run the type checker (tsc) before you accept the result.

Limits and direction

Types are removed when TypeScript is converted to JavaScript, so data that arrives at runtime, such as API responses or form input, still needs runtime validation.[1] Escape hatches like any and ignore comments can hide errors; Airbnb noted that many such placeholders remained in its codebase after migration.[5] There is some learning cost: Slack reported that developers with experience in other typed languages picked up the syntax within an hour or two, while files using advanced features can look daunting to JavaScript-only developers, so it recommends introducing features gradually.[6]

TypeScript is getting faster and more widely used. TypeScript 7.0, released in July 2026, is a native port written in Go that typically makes full builds 8 to 12 times faster. The July 2026 release announcement says version 7.0 has no programmatic API and recommends TypeScript 6.0 for some embedded-language tools, including Vue, Svelte and Angular templates.[4] Check your framework's current compatibility before upgrading. By GitHub contributor counts, TypeScript became the most used language on GitHub in August 2025, and GitHub links part of that growth to AI-assisted development benefiting from stricter type systems.[9]

How has TypeScript evolved?

2012-10
First release
Microsoft introduced TypeScript with version 0.8.[2]
2014-04-02
TypeScript 1.0
1.0 released and the project began accepting community contributions.[2]
2020-08-18
Large-scale migration
Airbnb reported that about 86% of its 6-million-line frontend monorepo had been converted.[5]
2023-01-03
Default for React Native apps
React Native 0.71 made TypeScript the default template for new apps.[7]
2025-08
Most used on GitHub
TypeScript overtook Python and JavaScript by GitHub contributor counts.[9]
2026-07-08
TypeScript 7.0
Native port written in Go released, typically 8 to 12 times faster on full builds.[4]

Which concepts are related to TypeScript?

  • Base language
    JavaScriptTypeScript builds on JavaScript and compiles to JavaScript; existing JavaScript can be checked gradually.[1]
  • Framework
    Next.jsNext.js has built-in TypeScript support and sets it up automatically in new projects created with create-next-app.[8]
  • Mobile
    React NativeSince version 0.71, new React Native apps start from a TypeScript template.[7]

TypeScript vs JavaScript

ComparisonTypeScriptJavaScript
When errors are foundIn the editor and at type-check time, before the code runs[1]Some errors appear only when the code runs[1]
How it runsConverted to JavaScript; types are removed[1]Runs directly in browsers and runtimes
Codebase sizeValue grows as the codebase grows[3]Fine for small scripts and quick prototypes
Getting startedExtra type syntax to learn; can be adopted file by file[1][6]No type syntax to learn
Editor and AI toolsType information powers auto-completion; GitHub links its growth partly to AI-assisted development[6][9]Tools have less explicit information to work with

Which sources explain TypeScript?

  1. Microsoft — TypeScript: JavaScript With Syntax For Types (official site, accessed 2026-10-13) — https://www.typescriptlang.org/
  2. Microsoft TypeScript Blog — Announcing TypeScript 1.0 (2014-04-02) — https://devblogs.microsoft.com/typescript/announcing-typescript-1-0/
  3. Microsoft TypeScript Blog — A 10x Faster TypeScript (2025-03-11) — https://devblogs.microsoft.com/typescript/typescript-native-port/
  4. Microsoft TypeScript Blog — Announcing TypeScript 7.0 (2026-07-08) — https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/
  5. The Airbnb Tech Blog — ts-migrate: A tool for migrating to TypeScript at scale (2020-08-18) — https://medium.com/airbnb-engineering/ts-migrate-a-tool-for-migrating-to-typescript-at-scale-cd23bfeb5cc
  6. Slack Engineering — TypeScript at Slack (2017-04-11) — https://slack.engineering/typescript-at-slack/
  7. React Native — First-class Support for TypeScript (2023-01-03) — https://reactnative.dev/blog/2023/01/03/typescript-first
  8. Next.js Docs — TypeScript (accessed 2026-10-13) — https://nextjs.org/docs/app/api-reference/config/typescript
  9. GitHub Blog — Octoverse: A new developer joins GitHub every second as AI leads TypeScript to #1 (2025-10-28) — https://github.blog/news-insights/octoverse/octoverse-a-new-developer-joins-github-every-second-as-ai-leads-typescript-to-1/