Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 4 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

TypeScript

Catch code mistakes before your app runs.

Languages, types and runtimesNPM

GitHubWebsite

1. License

“Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.”

Apache 2.0 allows commercial use free of charge; your compiled code is your own.

github.com/microsoft/TypeScript/blob/main/LICENSE.txt

From the package registry and GitHub, checked daily; card checked Nov 10, 2026. Tap a verdict to see its source.How we checkedReport an error

What TypeScript does

TypeScript is JavaScript with types: you, or your AI assistant, note what kind of data each part of the code expects. Its free compiler, tsc, reads the project and lists mistakes such as a misspelled field before anyone runs the app, then turns the code into plain JavaScript. Version 7 is a much faster rewrite of that compiler.

What people build with it

Block broken code from shipping

Your build or pull-request check runs the type check and stops when a field name is misspelled or a value is the wrong kind.

Let your AI assistant check its edits

After an assistant changes several files, it runs the compiler and fixes every reported line before handing the work back.

Add types to an old JavaScript app

Start with one file at a time; each step gives better editor hints without rewriting the whole project.

Move a project to version 7

Update old settings first so the new, faster compiler accepts the project without errors.

Keep Vue or lint tools working

Tools that load the compiler as a library still need version 6, so you install both side by side.

One data shape for front and back Idea

Describe an order or a user once and share it between the browser code and the server, so both sides agree.

TypeScript popularity

93 / 100
Gid Score, #5 overall
451M
downloads a week, npm
112K
GitHub stars
3,453
agent projects use it
TypeScript: downloads per weeknpm, typescript 450,984,480
TypeScript: GitHub starsmicrosoft/TypeScript 111,878

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How TypeScript is used

  • TypeScript is a dependency in 3,453 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (70.9% of the 4,867 JavaScript/TypeScript ones), #1 of 70 in languages, types and runtimes.
  • Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 13,502; those are left out of every share on this page.
  • Projects that use it most often also use ESLint (59.4%), React (54.7%), Tailwind CSS (52.2%).

By coding agent

1,887 projects, 57.6%
1,618 projects, 53.3%
1,489 projects, 61.0%
304 projects, 64.8%
291 projects, 61.4%
210 projects, 61.2%
165 projects, 49.4%
162 projects, 58.1%

Often used with

In 59.4% of its projects
In 54.7% of its projects
In 52.2% of its projects
In 42.8% of its projects
In 34.0% of its projects
In 35.6% of its projects
In 32.9% of its projects
In 34.7% of its projects

TypeScript in practice

Strengths

Output is plain JavaScript

The repository describes TypeScript as a superset of JavaScript that "compiles to clean JavaScript output". The README adds that the output is readable and standards-based.

Can start inside existing .js files

On the website, adding <code>// @ts-check</code> to a JavaScript file turns on editor errors. JSDoc tags such as <code>@param {any[]}</code> then add type information without renaming the file.

Mistakes show up in the editor

The website's examples flag a misspelled variable (<code>orr</code>) and a call to <code>trim</code> on an array, before the code runs.

Inference covers unannotated code

The site says the checker infers types from ordinary JavaScript. In its first example, an untyped object literal still produces an error when the code reads a property that does not exist.

Watch out for

Compiler memory on very large codebases

On the Stripe Dashboard, with tens of thousands of modules, Stripe's approach created "significant memory pressure" on the compiler. The Dashboard is not structured as distinct modules, so Stripe inferred a module structure and created project references from it.

The rest of the toolchain has to follow

A passing type check was not enough for Stripe. ESLint, Jest, Webpack and Metro also needed updates. Jest snapshot files broke because they hold hardcoded references to the test files that generated them.

Big conversions leave a backlog of suppressions

Stripe tagged unresolved errors with <code>@ts-expect-error</code> so it could finish the switch first. An initial pass produced over 97,000 suppressions. Iterating on the codemod brought that to 37,000. The Flow code had had about 5,000.

Install the stable or nightly build

npm install -D typescript

npm install -D typescript@next

More about TypeScript

Agent Skills for it
  • typescript-advanced-types: Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for build
  • typescript-best-practices: TypeScript grounding for type-system discipline: discriminated unions over flags, satisfies, parse-don't-validate at boundaries, branded pri
  • typescript-best-practices: TypeScript best practices. Use when reading or editing any .ts or .tsx file.
  • typescript-pro: Implements advanced TypeScript type systems, creates custom type guards, utility types, and branded types, and configures tRPC for end-to-en
  • typescript-advanced-types: Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for build
  • typescript-best-practices: TypeScript best practices. Use when reading or editing any .ts or .tsx file.

See all

Packages around it
  • eslint: Linter
  • react: UI library
  • tailwindcss: Utility-first CSS
  • zod: Schema validation
  • clsx: className builder
  • vitest: Test runner
More in Languages, types and runtimes

Alternatives

TypeScript This page

Apache-2.0Gid 93451M/wk

tsx

Pick tsx when you just want to run a TypeScript file in Node.js quickly; it is Node.js enhanced with esbuild.

vue-tsc

Pick vue-tsc to type-check Vue single-file components, which TypeScript 7 does not cover yet.

mypy

Pick mypy when the code is Python; it is an optional static type checker for Python.

Compare TypeScript with another tool

Get started

Tell your AI assistant

“Use TypeScript 7 (pin typescript@7.0.2 in devDependencies, not a global install), keep a tsconfig.json with rootDir and an explicit types list, run npx tsc --noEmit after every change and fix all errors; if a tool needs the compiler API, add @typescript/typescript6 side by side.”

  1. Install TypeScript into the project as a development package (Node.js is needed to install it).

    npm install -D typescript

    From devblogs.microsoft.com/typescript/announcing-typescript-7-0/

  2. Run the compiler from the project folder; it reads tsconfig.json and reports errors.

    npx tsc

    From typescriptlang.org/download/

Rules for your agent

Paste into AGENTS.md or CLAUDE.md
## TypeScript
- Install it as a dev dependency: `npm install -D typescript`. Use `typescript@next` only when nightly builds are wanted.
- In a JavaScript project, add `// @ts-check` at the top of `.js` files and give types through JSDoc (`/** @param {any[]} arr */`) before converting files.
- Describe object and function shapes with `interface` or `type`. Use literal unions (`"pass" | "fail"`) for fixed sets of values.
- When a bulk conversion leaves errors, tag them with `// @ts-expect-error` so they can be tracked and fixed after the conversion.
- If the compiler comes under memory pressure on a very large codebase, use project references.
- Types are removed when TypeScript becomes JavaScript. The emitted `.js` contains no annotations.

Mistakes to avoid

import ts from "typescript"; ts.createProgram(...) in a build script with typescript@7
Install @typescript/typescript6 under the typescript name (npm alias) for code that needs the compiler library

TypeScript 7.0 ships no API; the 7.0.2 package's main entry only exports version info.

"target": "es5" or "baseUrl": "." in tsconfig.json
Remove them; use a modern target and paths relative to the project root

In our run 7.0.2 stopped with TS5108 "Option 'target=ES5' has been removed" and TS5102 for baseUrl.

Using process or Buffer and expecting Node types to load on their own
npm i -D @types/node and set "types": ["node"] in compilerOptions

types now defaults to an empty list; our run reported TS2591 Cannot find name 'process'.

npx tsc src/index.ts in a folder that has tsconfig.json
npx tsc (uses tsconfig.json) or npx tsc --ignoreConfig src/index.ts

Our run stopped with error TS5112 and exit code 1.

Switching a Vue, Svelte or Astro project to TypeScript 7
Stay on TypeScript 6.0 for those projects for now

Their editor tools embed the compiler through the API that 7.0 does not have yet.

Questions

Do browsers run TypeScript?

No. tsc turns it into plain JavaScript, which runs in browsers, Node.js, Deno and Bun.

Will my TypeScript 6 project build with 7?

Code that compiles cleanly with 6.0, without deprecated settings, should compile the same in 7.0.

Why does tsc src/file.ts fail with error TS5112?

In a folder with tsconfig.json, file paths on the command line need --ignoreConfig; usually you just run tsc.

How often do new versions come out?

The team expects new feature versions every 3-4 months; 7.1 is in beta.