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.txt3. Used by agents' projects
Dependency in 3,453 public GitHub projects set up for AI coding agents that we scanned (55.2%).
4. Agent access
Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.
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
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
Often used with
TypeScript in practice
Strengths
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.
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.
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.
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
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.
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.
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@nextMore 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.
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
Pick tsx when you just want to run a TypeScript file in Node.js quickly; it is Node.js enhanced with esbuild.
Pick vue-tsc to type-check Vue single-file components, which TypeScript 7 does not cover yet.
Pick mypy when the code is Python; it is an optional static type checker for Python.
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.”
Install TypeScript into the project as a development package (Node.js is needed to install it).
npm install -D typescriptFrom devblogs.microsoft.com/typescript/announcing-typescript-7-0/
Run the compiler from the project folder; it reads tsconfig.json and reports errors.
npx tsc
Rules for your agent
## 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
TypeScript 7.0 ships no API; the 7.0.2 package's main entry only exports version info.
In our run 7.0.2 stopped with TS5108 "Option 'target=ES5' has been removed" and TS5102 for baseUrl.
types now defaults to an empty list; our run reported TS2591 Cannot find name 'process'.
Our run stopped with error TS5112 and exit code 1.
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.