{
 "kind": "tool",
 "slug": "typescript",
 "path": "tools/typescript/",
 "name": "TypeScript",
 "maker": null,
 "density": "full",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Languages, types and runtimes",
   "tools/languages-types/"
  ]
 ],
 "lead": "Catch code mistakes before your app runs.",
 "chips": [
  {
   "label": "Languages, types and runtimes",
   "path": "tools/languages-types/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install typescript"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/microsoft/TypeScript"
  },
  {
   "label": "Website",
   "href": "https://www.typescriptlang.org/"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "Apache-2.0",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": "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.",
   "note": "Apache 2.0 allows commercial use free of charge; your compiled code is your own.",
   "src": "https://github.com/microsoft/TypeScript/blob/main/LICENSE.txt"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 24, 2026",
   "note": "Latest GitHub release Aug 20, 2026. ",
   "src": "https://github.com/microsoft/TypeScript"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "3,453 projects",
   "status": "info",
   "sub": "#1 of 70 in its category",
   "note": "Dependency in 3,453 public GitHub projects set up for AI coding agents that we scanned (55.2%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Community skills",
   "status": "info",
   "sub": "6 skills by others",
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily; card checked Nov 10, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What TypeScript does",
   "parts": [
    {
     "t": "prose",
     "text": "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."
    },
    {
     "t": "h3",
     "text": "What people build with it"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "Block broken code from shipping",
       "text": "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.",
       "idea": false
      },
      {
       "title": "Let your AI assistant check its edits",
       "text": "After an assistant changes several files, it runs the compiler and fixes every reported line before handing the work back.",
       "idea": false
      },
      {
       "title": "Add types to an old JavaScript app",
       "text": "Start with one file at a time; each step gives better editor hints without rewriting the whole project.",
       "idea": false
      },
      {
       "title": "Move a project to version 7",
       "text": "Update old settings first so the new, faster compiler accepts the project without errors.",
       "idea": false
      },
      {
       "title": "Keep Vue or lint tools working",
       "text": "Tools that load the compiler as a library still need version 6, so you install both side by side.",
       "idea": false
      },
      {
       "title": "One data shape for front and back",
       "text": "Describe an order or a user once and share it between the browser code and the server, so both sides agree.",
       "idea": true
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "TypeScript popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "93",
       "of": "/ 100",
       "l": "Gid Score, #5 overall"
      },
      {
       "n": "451M",
       "l": "downloads a week, npm"
      },
      {
       "n": "112K",
       "l": "GitHub stars"
      },
      {
       "n": "3,453",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How TypeScript is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "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%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "1,887 projects, 57.6%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "1,618 projects, 53.3%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "1,489 projects, 61.0%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "304 projects, 64.8%",
       "v": "OpenAI Codex",
       "path": "agents/openai-codex/"
      },
      {
       "l": "291 projects, 61.4%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      },
      {
       "l": "210 projects, 61.2%",
       "v": "OpenCode",
       "path": "agents/opencode/"
      },
      {
       "l": "165 projects, 49.4%",
       "v": "OpenClaw",
       "path": "agents/openclaw/"
      },
      {
       "l": "162 projects, 58.1%",
       "v": "Devin Desktop",
       "path": "agents/devin-desktop/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 59.4% of its projects",
       "v": "ESLint",
       "path": "tools/eslint/"
      },
      {
       "l": "In 54.7% of its projects",
       "v": "React",
       "path": "tools/react/"
      },
      {
       "l": "In 52.2% of its projects",
       "v": "Tailwind CSS",
       "path": "tools/tailwindcss/"
      },
      {
       "l": "In 42.8% of its projects",
       "v": "Zod",
       "path": "tools/zod/"
      },
      {
       "l": "In 34.0% of its projects",
       "v": "clsx",
       "path": "tools/clsx/"
      },
      {
       "l": "In 35.6% of its projects",
       "v": "Vitest",
       "path": "tools/vitest/"
      },
      {
       "l": "In 32.9% of its projects",
       "v": "Tailwind Merge",
       "path": "tools/tailwind-merge/"
      },
      {
       "l": "In 34.7% of its projects",
       "v": "Lucide React",
       "path": "tools/lucide-react/"
      }
     ]
    }
   ]
  },
  {
   "id": "profile",
   "nav": "Profile",
   "h2": "TypeScript in practice",
   "parts": [
    {
     "t": "h3",
     "text": "Strengths"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Output is plain JavaScript",
       "v": "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."
      },
      {
       "l": "Can start inside existing .js files",
       "v": "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."
      },
      {
       "l": "Mistakes show up in the editor",
       "v": "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."
      },
      {
       "l": "Inference covers unannotated code",
       "v": "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."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Watch out for"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Compiler memory on very large codebases",
       "v": "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."
      },
      {
       "l": "The rest of the toolchain has to follow",
       "v": "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."
      },
      {
       "l": "Big conversions leave a backlog of suppressions",
       "v": "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."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Install the stable or nightly build"
    },
    {
     "t": "tabs",
     "label": "Example",
     "items": [
      {
       "tab": "Bash",
       "code": "npm install -D typescript\n\nnpm install -D typescript@next"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "profile",
   "h2": "More about TypeScript",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Agent Skills for it",
       "path": "skills/",
       "items": [
        "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."
       ]
      },
      {
       "title": "Packages around it",
       "items": [
        "eslint: Linter",
        "react: UI library",
        "tailwindcss: Utility-first CSS",
        "zod: Schema validation",
        "clsx: className builder",
        "vitest: Test runner"
       ]
      },
      {
       "title": "More in Languages, types and runtimes",
       "path": "tools/languages-types/",
       "items": [
        {
         "text": "tsx",
         "path": "tools/tsx/"
        },
        {
         "text": "ts-node",
         "path": "tools/ts-node/"
        },
        {
         "text": "jiti",
         "path": "tools/jiti/"
        },
        {
         "text": "vue-tsc",
         "path": "tools/vue-tsc/"
        },
        {
         "text": "Cloudflare Workers Types",
         "path": "tools/cloudflare-workers-types/"
        },
        {
         "text": "mypy",
         "path": "tools/mypy/"
        },
        {
         "text": "tsconfig-paths",
         "path": "tools/tsconfig-paths/"
        },
        {
         "text": "CFFI",
         "path": "tools/cffi/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "TypeScript",
       "me": true,
       "facts": [
        "Apache-2.0",
        "Gid 93",
        "451M/wk"
       ]
      },
      {
       "name": "tsx",
       "why": "Pick tsx when you just want to run a TypeScript file in Node.js quickly; it is Node.js enhanced with esbuild.",
       "path": "tools/tsx/",
       "facts": []
      },
      {
       "name": "vue-tsc",
       "why": "Pick vue-tsc to type-check Vue single-file components, which TypeScript 7 does not cover yet.",
       "path": "tools/vue-tsc/",
       "facts": []
      },
      {
       "name": "mypy",
       "why": "Pick mypy when the code is Python; it is an optional static type checker for Python.",
       "path": "tools/mypy/",
       "facts": []
      }
     ],
     "more": "Compare TypeScript with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "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."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Install TypeScript into the project as a development package (Node.js is needed to install it).",
       "code": "npm install -D typescript",
       "src": "https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/"
      },
      {
       "text": "Run the compiler from the project folder; it reads tsconfig.json and reports errors.",
       "code": "npx tsc",
       "src": "https://www.typescriptlang.org/download/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Rules for your agent"
    },
    {
     "t": "rules",
     "label": "Paste into AGENTS.md or CLAUDE.md",
     "text": "## TypeScript\n- Install it as a dev dependency: `npm install -D typescript`. Use `typescript@next` only when nightly builds are wanted.\n- In a JavaScript project, add `// @ts-check` at the top of `.js` files and give types through JSDoc (`/** @param {any[]} arr */`) before converting files.\n- Describe object and function shapes with `interface` or `type`. Use literal unions (`\"pass\" | \"fail\"`) for fixed sets of values.\n- When a bulk conversion leaves errors, tag them with `// @ts-expect-error` so they can be tracked and fixed after the conversion.\n- If the compiler comes under memory pressure on a very large codebase, use project references.\n- Types are removed when TypeScript becomes JavaScript. The emitted `.js` contains no annotations.\n"
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "import ts from \"typescript\"; ts.createProgram(...) in a build script with typescript@7",
       "fix": "Install @typescript/typescript6 under the typescript name (npm alias) for code that needs the compiler library",
       "why": "TypeScript 7.0 ships no API; the 7.0.2 package's main entry only exports version info."
      },
      {
       "dont": "\"target\": \"es5\" or \"baseUrl\": \".\" in tsconfig.json",
       "fix": "Remove them; use a modern target and paths relative to the project root",
       "why": "In our run 7.0.2 stopped with TS5108 \"Option 'target=ES5' has been removed\" and TS5102 for baseUrl."
      },
      {
       "dont": "Using process or Buffer and expecting Node types to load on their own",
       "fix": "npm i -D @types/node and set \"types\": [\"node\"] in compilerOptions",
       "why": "types now defaults to an empty list; our run reported TS2591 Cannot find name 'process'."
      },
      {
       "dont": "npx tsc src/index.ts in a folder that has tsconfig.json",
       "fix": "npx tsc (uses tsconfig.json) or npx tsc --ignoreConfig src/index.ts",
       "why": "Our run stopped with error TS5112 and exit code 1."
      },
      {
       "dont": "Switching a Vue, Svelte or Astro project to TypeScript 7",
       "fix": "Stay on TypeScript 6.0 for those projects for now",
       "why": "Their editor tools embed the compiler through the API that 7.0 does not have yet."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Do browsers run TypeScript?",
       "a": "No. tsc turns it into plain JavaScript, which runs in browsers, Node.js, Deno and Bun.",
       "evidence": {
        "url": "https://www.typescriptlang.org/",
        "quote": "TypeScript code converts to JavaScript, which runs anywhere JavaScript runs"
       }
      },
      {
       "q": "Will my TypeScript 6 project build with 7?",
       "a": "Code that compiles cleanly with 6.0, without deprecated settings, should compile the same in 7.0.",
       "evidence": {
        "url": "https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/",
        "quote": "Practically any TypeScript code that compiles cleanly with TypeScript 6.0 (with the stableTypeOrdering flag on, and without any ignoreDeprecations flag set) should compile identically in TypeScript 7.0."
       }
      },
      {
       "q": "Why does tsc src/file.ts fail with error TS5112?",
       "a": "In a folder with tsconfig.json, file paths on the command line need --ignoreConfig; usually you just run tsc.",
       "evidence": {
        "url": "https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/",
        "quote": "Command line builds cannot take file paths when the current directory contains a tsconfig.json file unless passed an explicit --ignoreConfig flag."
       }
      },
      {
       "q": "How often do new versions come out?",
       "a": "The team expects new feature versions every 3-4 months; 7.1 is in beta.",
       "evidence": {
        "url": "https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/",
        "quote": "with new featureful versions published every 3-4 months."
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm typescript"
  ],
  [
   "Category",
   "Languages, types and runtimes"
  ],
  [
   "License",
   "Apache-2.0"
  ],
  [
   "Latest version",
   "v7.0.2, August 20, 2026"
  ],
  [
   "On GitHub since",
   "June 2014"
  ],
  [
   "Gid Score",
   "93.2"
  ],
  [
   "Rank in category",
   "#1 of 70"
  ],
  [
   "GitHub",
   "microsoft/TypeScript"
  ],
  [
   "Last change",
   "Nov 24, 2026"
  ]
 ],
 "good": [
  "Version 7 has no programming interface yet, so tools that load the compiler as a library still need version 6.",
  "Vue, Svelte, Astro and MDX projects should stay on version 6 for now.",
  "Old settings such as an ES5 target or baseUrl are now hard errors, and strict checking is on by default."
 ],
 "checked_line": "Read by AgentGid from 12 official pages, card checked Nov 10, 2026; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/microsoft.png"
}