Urgent.News

What's breaking now, across thousands of outlets.

Tech

Doom Ran Inside TypeScript's Type Checker. Here's How Types Execute Code

Book: The TypeScript Type System Also by me: The TypeScript Library — the 5-book collection My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub The first frame of Doom took 12 days to render. None of the game's code ran as JavaScript. The TypeScript type checker evaluated it, at about 20 million type instantiations…

In February 2025, TypeScript type checker demonstrated an extraordinary feat by running the entire Doom game using WebAssembly. The type checker evaluated 20 million type instantiations per second, producing Doom as a type. This was accomplished by Dimitri Mitropoulos, who wrote a TypeScript-based WebAssembly runtime and fed it a Doom program compiled to WebAssembly.

The TypeScript type system utilizes primitives such as conditional types, infer, and template literals to create complex type-level programs. In the case of Doom, types lived as binary two's complement digits inside string literal types. The type checker executed about 18 million instructions, one at a time, to render the first frame of Doom.

Three main limits were hit during this process: instantiation depth of 100, tail-recursive iterations of 1,000, and an instantiation count of 5 million. Each limit serves to prevent the type checker from hanging the editor due to excessively deep recursion or lengthy computations. The project needed up to 100 GB of memory but managed to complete the task in 12 days, resulting in 177 TB of data.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

The fy field in SEC XBRL data doesn't mean what you think

The SEC gives you every US public company's financials for free through data.sec.gov . No key, no signup. It's one of the best free datasets in finance, and it's easy to get wrong.

  • "fy" tag in SEC XBRL data indicates filing year, not financial year
  • Apple's 2025 10-K report includes 2023, 2024, and 2025 net income data
  • Analysts should focus on period dates to accurately categorize financial data

My first DEV Post

🚀 Starting My Developer Journey: Learning, Building, and Growing Hey everyone! 👋 I'm a B.Tech student passionate about software development, Artificial Intelligence, and Machine Learning.

More from Wednesday 14 October →