{
  "id": 14495342,
  "title": "Doom Ran Inside TypeScript's Type Checker. Here's How Types Execute Code",
  "url": "https://urgent.news/2026/10/14/doom-ran-inside-typescripts-type-checker-heres-how-types-execute-code",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-14T17:03:27.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/gabrielanhaia/doom-ran-inside-typescripts-type-checker-heres-how-types-execute-code-50i1"
  },
  "original_language": "en",
  "account": "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.\n\nThe 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.\n\nThree 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.",
  "summary": "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…",
  "key_points": [
    "In February 2025, TypeScript type checker ran entire Doom game using WebAssembly",
    "Type checker evaluated 20 million type instantiations per second",
    "Type system used conditional types, infer, and template literals to create complex programs"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}