Prerequisites
TypeScript: JavaScript That Scales
Microsoft's typed superset of JavaScript brought static analysis to the most dynamic language on earth.
The Maintainability Crisis
By 2012, JavaScript codebases were growing far beyond what Brendan Eich had imagined. Google had Closure Compiler, Facebook would later build Flow, but Microsoft’s Anders Hejlsberg (designer of C# and Turbo Pascal) took a different approach: a strict syntactic superset of JavaScript that added optional static types.
interface Post {
title: string;
era: "era-1" | "era-2" | "era-3" | "era-4" | "era-5";
tags: string[];
publishedAt: Date;
}
function getPostsByEra(posts: Post[], era: Post["era"]): Post[] {
return posts.filter(p => p.era === era);
}
The Adoption Curve
TypeScript’s genius was pragmatism: any valid JavaScript is valid TypeScript. Teams could adopt it incrementally, file by file. By 2024, TypeScript had become the default for new web projects — not because types are novel, but because the developer experience (autocomplete, refactoring, catch-errors-before-runtime) was simply too good to ignore.