> For the complete documentation index, see [llms.txt](https://isubasinghe.gitbook.io/isithas-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://isubasinghe.gitbook.io/isithas-wiki/software_engineering/languages/typescript.md).

# TypeScript

## Basic idea

JavaScript plus a structural, gradual static type system (Microsoft, 2012). Compiles to plain JS; types are erased at runtime. The dominant way to write industrial JS today.

## Key facts

* Year / creator: 2012, Microsoft (Hejlsberg).
* Typing: static, structural, gradual (`any` opt-out); generics, unions, intersections, conditional types.
* Compiles to JS — no runtime cost (types erased).
* Notable: discriminated unions, mapped types, template literal types.
