Programming language · 2012

TypeScript

Programming language, superset of JavaScript that compiles to JavaScript.

Official site ›
TypeScript logo
TypeScriptWritten in
2012First released
MicrosoftDeveloper
staticTyping
Apache Software License 2.0License
Built fromInfluenced TypeScript GoTypeScriptJavaScriptC#HaskellAngularDart
RewriteCompilerInfluence
Replacedplain JavaScript for large, long-lived codebases
Being replaced byStill ascending; no successor in sight

What is TypeScript written in?

TypeScript is self-hosting: the TypeScript compiler (tsc) is written in TypeScript. It does not have its own runtime, it transpiles to JavaScript, which then runs on engines such as V8.

What TypeScript is used for

TypeScript is JavaScript with static types, used to build large, maintainable front-end and back-end applications where the type checker catches bugs before runtime. It is now the default choice for most serious React, Angular, and Node.js projects.

Notable software: VS Code, Angular, and large parts of the tooling at Microsoft, Slack, and Airbnb are written in TypeScript.

About TypeScript

TypeScript is a programming language, superset of JavaScript that compiles to JavaScript. It is a statically typed and garbage-collected language that compiles (transpiles) into another language to run. It supports object-oriented, functional, and imperative programming. Transpiling means the compiler emits source in another high-level language rather than machine code, so the output then runs on that language's runtime.

TypeScript first appeared in 2012 and was designed by Microsoft, Anders Hejlsberg, and Steven Lucco at Microsoft. Today TypeScript is one of the most widely used programming languages in the world.

TypeScript in the language family tree

TypeScript drew on ideas from JavaScript, C#, and Haskell and went on to influence Dart and Angular.

Sources: Wikipedia · Wikidata · Official site

Quick Facts

Short answer
tsc is written in TypeScript
Created by
Anders Hejlsberg, Microsoft, 2012
Output
Transpiles to JavaScript
Runtime
None of its own, runs on JS engines

TypeScript transpiles, it does not run

TypeScript is a typed superset of JavaScript. The compiler checks types and then strips them away, emitting plain JavaScript. There is no TypeScript virtual machine: the generated JavaScript executes on whatever engine the target uses, V8 in Node.js and Chrome, JavaScriptCore in Safari.

tsc is itself written in TypeScript and compiled with a previous version of tsc, making TypeScript self-hosting in the same sense as Rust or Go.

Frequently Asked Questions

What language is TypeScript written in?
The TypeScript compiler, tsc, is written in TypeScript itself, so TypeScript is self-hosting. TypeScript has no separate runtime; it compiles (transpiles) to JavaScript, which runs on JavaScript engines like V8.
What languages influenced TypeScript?
TypeScript was influenced by JavaScript, C#, Haskell among others. See the influence section above for the full list.
Which languages did TypeScript influence?
TypeScript influenced Dart, Angular among others.
Is TypeScript self-hosting?
Yes, TypeScript is self-hosting, its compiler can compile itself.
When was TypeScript first released?
TypeScript was first released in 2012. It was designed by Microsoft, Anders Hejlsberg, and Steven Lucco.

Evidence Sources

Discover More

Embed this graph

Paste this iframe into any HTML page to show the TypeScript relationship graph.

<iframe src="https://www.languagelineage.org/embed?lang=typescript" width="100%" height="500" loading="lazy" style="border:0" title="TypeScript relationship graph"></iframe>

Please attribute the visualization to Language Lineage and link to the TypeScript source record.

Explore TypeScript in Graph →