TechnologyProgramming language

TypeScript

Also known as: TS

Programming language developed by Microsoft that adds optional static types to JavaScript and compiles to plain JavaScript for any runtime.

TypeScript is a superset of JavaScript that adds optional static type annotations, interfaces, generics and other features for describing the shape of data. A compiler checks the types and then emits ordinary JavaScript, removing the annotations, so the output runs in any browser or runtime. The type system is structural, meaning compatibility depends on the members an object has rather than on declared names, and it is designed to model common JavaScript patterns, allowing existing code to be converted gradually.

Microsoft released TypeScript publicly in October 2012. Its lead designer is Anders Hejlsberg, previously known for Turbo Pascal, Delphi and C#. The language is open source under the Apache License 2.0. Much of its value comes from tooling: the same compiler powers editor features such as autocompletion, inline errors and safe refactoring, which helped popularize it with editors like Visual Studio Code, itself written in TypeScript. In 2025 Microsoft announced a port of the compiler to Go to make type checking substantially faster.

TypeScript has become a common default for large JavaScript codebases, frameworks and libraries, and it consistently ranks among the most used languages in developer surveys. Static types catch many errors before code runs and serve as documentation, though type safety ends at runtime boundaries, where data from networks or users must still be validated. Critics point to added build complexity and the learning curve of advanced types. Its success has encouraged proposals to let JavaScript engines accept type annotations directly.

Key points

  • TypeScript adds optional static types to JavaScript and compiles to plain JavaScript.
  • Anders Hejlsberg leads its design at Microsoft, which released it in 2012.
  • Its type system is structural, focusing on the shape of data rather than declared names.
  • Runtime data from users or networks still requires validation despite static checks.

Related entries

Technology

JavaScript

Programming

High-level programming language of the web, created at Netscape in 1995, that runs in every major browser and on servers through runtimes like Node.js.

Glossary term

Static Typing

Programming

Approach in which a program's types are checked before it runs, usually by a compiler, so that many type errors are caught ahead of execution.

Glossary term

Type System

Programming

Set of rules a programming language uses to assign types such as integer or string to values and to check that operations use them consistently.

Glossary term

Type Safety

Programming

Degree to which a programming language prevents type errors, in which a value is used as if it were a different, incompatible kind of data.

Glossary term

Compiler

Programming

Program that translates source code written in one programming language, usually a high-level one, into another form such as machine code.

Technology

Free source-code editor from Microsoft, built on open-source foundations, with a large extension ecosystem and built-in Git and debugging support.

Technology

Node.js

Programming

Open-source JavaScript runtime built on Google's V8 engine that runs JavaScript outside the browser using an event-driven, non-blocking model.

Technology

Create T3 App

Programming

Command-line tool that scaffolds full-stack TypeScript web applications using the T3 Stack of Next.js, tRPC, Tailwind CSS and related libraries.

Referenced by

Other entries that discuss or point to TypeScript.