TypeScript
In-depth entryby Microsoft · Language · also known as TS
Statically typed superset of JavaScript from Microsoft that compiles to plain JavaScript and powers editor tooling across the web ecosystem
Overview
TypeScript is a programming language developed by Microsoft that extends JavaScript with a static type system. Any valid JavaScript is valid TypeScript; the compiler (tsc) checks types at build time and emits plain JavaScript that runs in browsers, Node.js, Bun or Deno. The type system is structural and gradual, so teams can adopt it file by file and tighten strictness over time.
Beyond type checking, the TypeScript language service is the engine behind completion, refactoring and inline diagnostics in VS Code, Zed, Cursor and most other editors, even for plain JavaScript projects. Type declarations for third-party packages are either bundled with the packages or distributed through the DefinitelyTyped project, and most popular libraries now ship their own.
In practice TypeScript is the default language of modern web development: Next.js, React, Hono, Vite, Drizzle and Prisma are written in it or designed around it, and build tools such as esbuild, SWC and the Bun and Deno runtimes can strip types directly so tsc is often used only for checking. Microsoft has published a native port of the compiler written in Go, intended to reduce check times for large codebases; it is distributed as a preview alongside the JavaScript implementation.
Limitations: types are erased at run time, so runtime validation needs a separate library; configuration (tsconfig.json, module resolution, declaration output) has many interacting options; and advanced type-level programming can slow compilation and make errors hard to read.
Capabilities
- Gradual, structural static typing over JavaScript
- Compiler that emits JavaScript targeting chosen ECMAScript versions
- Language service used by editors for completion and refactoring
- Declaration files for typing untyped JavaScript libraries
- Project references for incremental builds in monorepos
- Strictness flags to tighten checks progressively
Typical workflows
- Add types incrementally to an existing JavaScript codebase
- Type-check in CI while a bundler strips types for output
- Share types between a server API and its client
- Generate declaration files for a published library
Strengths
- Catches many errors before run time
- Universal editor support through the language service
- Most of the npm ecosystem ships type declarations
- Apache-2.0 license, open development
Limitations
- Types are erased; no runtime guarantees without a validator
- Configuration surface is large and sometimes confusing
- Complex types can slow compilation and produce opaque errors
- Adds a build step compared with plain JavaScript
Prerequisites
- Node.js, Bun or Deno to run the compiler and tooling
Who it is for
- Web and full-stack developers
- Library authors publishing to npm
- Teams maintaining large JavaScript codebases
Alternatives & comparison
Deno and Bun are runtimes rather than languages, but both execute TypeScript directly and are often the reason a project needs no separate compile step; they still rely on TypeScript's checker for diagnostics. Go and Rust are alternatives for teams who want static types with native binaries and no JavaScript runtime; they do not target the browser without WebAssembly.
- Bun
All-in-one JavaScript and TypeScript runtime, package manager, bundler and test runner built on JavaScriptCore by Oven
Open sourceOpen source - Deno
Secure-by-default JavaScript and TypeScript runtime from Deno Land with web-standard APIs, built-in tooling and an optional hosted Deploy service
Open sourceOpen source - Go
Statically typed, garbage-collected language from Google that compiles to single binaries and is widely used for servers, CLIs and infrastructure tooling
Open sourceOpen source - Rust
Compiled systems programming language with ownership-based memory safety, the Cargo build tool and no garbage collector
Open sourceOpen source - Swift
Apple's compiled, memory-safe, multi-paradigm language for Apple platforms, Linux, Windows and embedded targets, developed in the open at swift.org
Open sourceOpen source
Sources & verification
Primary sources consulted for this record. Claims are tied to the fields each source supports; the automated link checker re-verifies every URL on a schedule.
- Licensehttps://github.com/microsoft/TypeScript/blob/main/LICENSE.txtchecked Nov 1, 2026
Supports: license_spdx
- Official documentationchecked Nov 1, 2026
- Official sitechecked Nov 1, 2026
- Repositorychecked Nov 1, 2026
- Confidence
- High
- Reviewed
- Nov 1, 2026
- Links
- Verified · Nov 2, 2026
Spotted an error?
More in Programming languages & runtimes
Homebrew
Homebrew maintainers · macOS system utilities
Community-maintained package manager for macOS and Linux that installs command-line tools (formulae) and desktop apps (casks) from the terminal
Node.js
OpenJS Foundation · Programming languages & runtimes
Server-side JavaScript runtime built on the V8 engine, governed by the OpenJS Foundation, with npm as its package ecosystem
Python
Python Software Foundation · Programming languages & runtimes
General-purpose, dynamically typed programming language with a large standard library and the dominant ecosystem for data science and machine learning
Swift
Apple Inc. · Swift & SwiftUI development
Apple's compiled, memory-safe, multi-paradigm language for Apple platforms, Linux, Windows and embedded targets, developed in the open at swift.org
Lean
Lean FRO · Mathematical & statistical computing
Open-source functional programming language and interactive theorem prover with dependent types, the Mathlib mathematics library and VS Code tooling, stewarded by the Lean FRO
uv
Astral · Programming languages & runtimes
Rust-based Python package and project manager from Astral that replaces pip, venv, pip-tools and pyenv with one command-line tool