typescript
TypeScript is a language for application scale JavaScript development
About
TypeScript is a language for application scale JavaScript development
Live mirror of the GitHub README. Updated whenever the repo's default branch changes.
TypeScript
TypeScript is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the playground, and stay up to date via our blog and Twitter account.
Find others who are using TypeScript at our community page.
Installing
For the latest stable version:
npm install -D typescript
For our nightly builds:
npm install -D typescript@next
Contribute
NOTE: Code changes in this repo are now limited to a small category of fixes:
- Crashes that were introduced in 5.9 or 6.0 that also repro in 7.0 and have a portable fix and don't incur other behavioral changes
- Security issues
- Language service crashes that substantially impact mainline usage
- Serious regressions from 5.9 (these must seriously impact a large proportion of users)
Most bug fixes should be submitted to the typescript-go repository. Feature additions and behavorial changes are currently on pause until TypeScript 7.0 is completed.
There are many ways to contribute to TypeScript.
- Submit bugs and help us verify fixes as they are checked in.
- Review the source code changes.
- Engage with other TypeScript users and developers on StackOverflow.
- Help each other in the TypeScript Community Discord.
- Join the #typescript discussion on Twitter.
- Contribute bug fixes.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Documentation
Roadmap
For details on our planned features and future direction, please refer to our roadmap.
Quick facts
npm install typescriptThis package powers TypeScript
The typescript package is the canonical implementation of TypeScript. Sourcemap Explorer uses this exact npm package as the framework-level fingerprint when it flags TypeScript on a page — both via the bundled node_modules/typescript/ source paths and via the embedded package.json inside the JavaScript sourcemap.
How Sourcemap Explorer detects typescript
We catch typescript from two complementary signals: bundled source paths and the embedded package.json. Modern bundlers (webpack, Vite, esbuild, Rollup, Turbopack) preserve the original node_modules/typescript/ paths inside the JavaScript sourcemap's sources[] array — that's the canonical signal. When the matching package.json is also captured in sourcesContent[], we read the exact version field — patch number included. No regex guessing, no version inference.
- 1
Confirm the site exposes sourcemaps
In DevTools Network, check the response headers of any application script for `SourceMap` or `X-SourceMap`. Failing that, fetch the script's last 4 KB and look for a `//# sourceMappingURL=` comment.
- 2
Find the package in the bundle
Open DevTools → Network → reload. Click any application script and look at its sourcemap. Inside, search `sources[]` for entries matching `node_modules/typescript/` — every match confirms the package is bundled. The matching `sourcesContent[i]` for `node_modules/typescript/package.json` gives you the exact installed version.
- 3
Read the version directly from package.json
Run `jq -r '. as $m | $m.sources | to_entries[] | select(.value | endswith("node_modules/typescript/package.json")) | $m.sourcesContent[.key] | fromjson | .version' bundle.js.map`. Sourcemap Explorer automates the same query in the popup.
Recent versions
FAQ
What is typescript used for?
TypeScript is a language for application scale JavaScript development
How can I tell if a website is using typescript?
Open the page in Chrome with the Sourcemap Explorer extension installed and read the Stack tab. We catch `typescript` from two complementary signals: `node_modules/typescript/` paths inside the JavaScript sourcemap, and the embedded `package.json` we read for exact-version detection. Without the extension you can do the same lookup manually in DevTools — the steps are listed in the "How Sourcemap Explorer detects" section above.
What is the latest version of typescript?
6.0.3, as published on the npm registry. The "Recent versions" table on this page lists the most recent 8 releases with their release dates. Sourcemap Explorer reports the version actually bundled into a site, which can lag the latest release by months on real-world deployments.
What is the relationship between typescript and TypeScript?
typescript is the canonical npm package for TypeScript. Sourcemap Explorer treats finding `typescript` in a bundle as the framework-level signal that TypeScript is on the page, and the page you're reading is the canonical Sourcemap Explorer entry for the package itself.
Where can I read more?
Project homepage: https://www.typescriptlang.org/. Source code: https://github.com/microsoft/TypeScript. Published on npm: https://www.npmjs.com/package/typescript. Licensed as Apache-2.0.
Detected by Sourcemap Explorer
When a bundle ships sourcemaps, we read the embedded package.json for typescript and report the precise version. Without sourcemaps, an import / require in the page's scripts is enough to flag it.