TypeScript is a programming language from Microsoft that adds a static type system to JavaScript. It is a strict superset, so every valid JavaScript file is already valid TypeScript, but declarations, interfaces and inferred types are checked before anything runs. Anders Hejlsberg’s team shipped the first release in 2012, and the compiler is now developed in the open at github.com/microsoft/TypeScript under the Apache 2.0 licence. Types are erased at build time and ordinary JavaScript comes out, so the result runs in any browser, in Node.js, Deno, Bun or Electron — the types are a development-time contract, not a runtime cost.
The current stable line is TypeScript 7, a native rewrite of the compiler in Go that typically builds 8 to 12 times faster than the JavaScript-based 6.x compiler while using less memory, and that talks to editors over the Language Server Protocol. TypeScript 7.0.2 is the latest stable release; 6.0.3 remains the last of the original implementation and is still published for tools that need the old compiler API.
allowJs with checkJs lets a project adopt types one file at a time instead of rewriting..d.ts files describe a library’s surface, and the @types packages on npm supply typings for thousands of plain-JavaScript projects.tsc --watch, incremental compilation and project references keep large monorepos and multi-package repositories responsive.TypeScript pays off where code outlives the person who wrote it. A renamed field, a nullable value passed where a string is expected, or a property that never existed becomes a red squiggle in the editor instead of a 2 a.m. production error, and the compiler enforces the same rules in CI. Because the types ship as .d.ts files, libraries written in TypeScript hand their editors precise autocompletion and inline documentation to everyone who installs them. With 7.0 the check itself is cheap enough to run constantly: editor load, find-all-references and full builds all became an order of magnitude faster, which is what makes a strict configuration practical on a large codebase rather than a tax on every save.
Install it into a project with npm install -D typescript, then create a configuration with npx tsc --init. A sensible starting point sets "strict": true, "target": "ES2022" and "module": "nodenext" or "moduleResolution": "bundler" depending on whether a bundler is in the build. Compile with npx tsc, or keep a watcher running with npx tsc --watch; the emitted JavaScript and .d.ts files land in outDir. Runtimes such as Deno and Bun execute TypeScript directly, and bundlers (Vite, esbuild, swc) strip the types without a separate compile step. Tools that still import the compiler API, typescript-eslint among them, can run side by side with 7.0 by installing the compatibility package @typescript/typescript6, which provides a tsc6 executable and the 6.0 API.