"TypeScript is just JavaScript plus types, and the types are erased" is almost true, and the gap matters more now that tools run .ts files by simply deleting the types. A few TypeScript features aren't types at all: enum, namespace and constructor parameter properties generate real JavaScript. A tool that only strips types, like Node.js running a .ts file directly, can't delete them, so it refuses the whole file.
enum Status { Active, Archived }
const s: Status = Status.Archived;
console.log("status:", s, Status[s]);$ node --experimental-strip-types status.ts
enum Status { Active, Archived }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError [ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX]: TypeScript enum is not supported in strip-only modeTypeScript is a free, open-source language developed by Microsoft, first released publicly in October 2012 after roughly two years of internal development, with Anders Hejlsberg — creator of Turbo Pascal and Delphi, and lead architect of C# — leading its development. It is a strict superset of JavaScript: every valid JavaScript program is already valid TypeScript, and the added type annotations are checked at compile time, then completely erased when TypeScript compiles down to plain JavaScript that runs unchanged in any browser or Node.js environment.
Born from JavaScript's problems at scale
By 2010, Microsoft's own teams and external customers were hitting real friction building large applications in JavaScript: with no static types, mistakes that a compiler would normally catch (calling a method that doesn't exist, passing the wrong shape of object) surfaced only at runtime, sometimes in production. TypeScript's answer was to add an optional type layer on top of JavaScript without breaking any existing JavaScript code or its ecosystem — a deliberately incremental adoption path rather than a clean-slate replacement language.
Every JavaScript file is valid TypeScript
This is what made adoption realistic for existing codebases: you can rename a .js file to .ts and — as far as JavaScript syntax goes — nothing about the code itself has to change; the same syntax is already valid TypeScript. What "zero changes" glosses over is strict checking, which is now the default (since TypeScript 6.0): a parameter with no type annotation is an implicit-any compile error (TS7006) rather than something that's silently allowed. Renaming still works as an adoption path, but in practice it either means starting with looser settings ("strict": false, or just "noImplicitAny": false) and tightening later, or fixing the implicit-any errors as they surface. Either way, types are then added incrementally, file by file, function by function.
// valid JavaScript AND valid TypeScript syntax, unchanged —
// but under the default strict settings, the untyped parameter below
// is a compile error (TS7006: implicitly has an 'any' type) until either
// a type is added or noImplicitAny is turned off for the migration
function greet(name) {
return "Hello, " + name;
}
// adding a type annotation catches mistakes at compile time
function greetTyped(name: string): string {
return "Hello, " + name;
}
greetTyped(42); // COMPILE ERROR: argument of type number not assignable to stringtsc compiles the same file without complaint, because it doesn't merely erase. It writes the enum out as a real object (var Status; (function (Status) { ... })(Status || (Status = {}));), and the program prints status: 1 Archived. So the precise statement is that type annotations are erased, while a handful of TypeScript-only constructs are compiled into code. If your code has to run under type stripping, the erasableSyntaxOnly compiler option makes tsc reject those constructs up front (error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled.). Plain-JavaScript equivalents, like an as const object instead of an enum, pass both checks:
const Status = { Active: 0, Archived: 1 } as const;
type Status = (typeof Status)[keyof typeof Status];
const s: Status = Status.Archived;
console.log("status:", s);$ node --experimental-strip-types status.ts
status: 12026: a historic rewrite, from TypeScript to Go
TypeScript 6.0 (March 2026) was announced as deliberately the LAST version of the compiler written in TypeScript itself. TypeScript 7.0, codenamed "Project Corsa," reached Release Candidate in June 2026 and was released in early August 2026; it ports the entire compiler and language service to Go — preserving identical type-checking behavior while reporting roughly a 10x speedup in type-checking, thanks to native code and shared-memory multi-threading unavailable to the old JavaScript-based compiler (codenamed "Strada").