Skip to content
0:00 / 0:00

#typescript#doom#typesystem

TypeScript types can run DOOM

Michigan TypeScript

22K subscribers • 12 videos on Hallway

YouTube

Advanced. Deep dive for people who know the field.

485K views1 year ago3 recommendations

Programming languagesWeb developmentTypeScriptLanguage design and type systems

A demonstration of the Doom engine running entirely within the TypeScript type system.

Yep. We got the Doom engine running purely in TypeScript types. Like. For real. We’ve prepared two more videos, one answering “why we did this” (storytime format) and another answering “how we did this” (technical deep-dive). What would you like to hear about for those? It’s all open source: github.com/MichiganTypeScript/typescript-types-only-wasm-run… If you’d like to contact us for any reason, please email doom@michigantypescript.com or reach out on the #doom channel on the MiTS Discord (link below) If you'd like a version of this video without background music or a moving animation, you can find it here: youtu.be/s4UE_CUn2N0 Michigan TypeScript has never and will never have any sponsored content. All videos have always and will always have all possible ads or monetization turned off. If you wanna support what we do, the best thing you can do is take what you learn here back to your job and make software that puts smiles on your user’s faces. And if you REALLY like what we do, then you’ll love SquiggleConf (cross-language devtools conference, squiggleconf.com, CFP open now for this year's conf, September 18-19 2025 in Boston). BlueSky: bsky.app/profile/michigantypescript.com Twitter: twitter.com/MiTypeScript Mastodon: fosstodon.org/@MichiganTypeScript Threads: threads.net/@michigantypescript Instagram: instagram.com/michigantypescript TikTok: tiktok.com/@michigantypescript Discord: discord.michigantypescript.com GitHub: github.com/MichiganTypeScript SoundCloud: soundcloud.com/michigan-typescript For those asking about the shirt, you can get it here: shop.squiggle.tools

Why it's here

3 people recommend this

What people say. Recommended as an impressive demonstration of the Turing completeness of TypeScript's type system.

friendlysockon Lobsters • Recommends

TypeScript types can run DOOM

drejon Hacker News • Recommends

On “A parser for TypeScript types, written in TypeScript types”

For those not familiar with this kind of computing challenges, I must link this wonderful video about TypeScript types running... DOOM. link to this video

u/AtmosphereDefiantin r/typescript • Recommends

TypeScript types can run DOOM!

u/WiglyWormin r/typescript • Mentions

On “A 10x Faster TypeScript”

[video

u/NatoBoramin r/typescript • Mentions

On “Porting Doom to Typescript Types took 3.5 trillion lines, 90GB of RAM and a full year of work”

Better watch the original video the article is based on anyway: link to this video

u/thinker227Noa (github.com/thinker227/noa)in r/ProgrammingLanguages • Mentions

On “Typo: A Programming Language using TypeScript's Type System!”

Obligatory mention of Doom being run inside TS's type system

stuaxoon Hacker News • Mentions

On “A 10x Faster TypeScript”

I'd like to see if it makes a difference to the version of DOOM that runs in the TypeScript type system. link link to this video

ninetyninenineon Hacker News • Mentions

On “Python developers are embracing type hints”

Typescript types (and Idris) are Turing complete. You can actually get typescript types to run doom. link to this video Idris on the other hand is SPECIFICALLY designed so types and the program live in the same language. See the documentation intro: link THe powerful thing about these languages is that they can prove your program correct. For testing you can never verify your program to be correct. Testing is a statistical sampling technique. To verify a program as correct via tests you have to test every possible input and output combination of your program, which is impractical. So instead people write tests for a subset of the possibilities which ONLY verifies the program as correct for that subse…

u/AtmosphereDefiantin r/typescript • Mentions

On “Can TypeScript run DOOM?”

Yes. Yes it can. Dimitri from Michigan TypeScript has done it! [video

u/NUTTA_BUSTAHin r/typescript • Mentions

On “Sum Type From String Literal”

Typescript can also run DOOM, because of course it can run DOOM: link to this video

u/dashingsaucein r/typescript • Mentions

On “TypeScript stuff I Wish I Knew Earlier”

In no particular order: - Run tsc, don’t just rely on editor to surface errors (some only show when you open the problem file). - If you’re building a library/package/client, use a dedicated type testing library! - There’s almost certainly an existing type utility that could help you solve whatever type problem you think you need to solve with custom type gymnastics (I found “type-fest” regrettably a year too late) - JSON schema x Typescript is super cool and powerful, especially in the AI era. Power of TS with portability of JSON. Would recommend Typebox (and its Zod/Valibot/etc. mapping library Typemap). - Skim this (or dive in). Great way to learn is to find the patterns across the patte…

u/AtmosphereDefiantin r/typescript • Mentions

On “TypeScript types can run DOOM!”

[video

u/bartduistersin r/typescript • Mentions

On “Can TypeScript run DOOM?”

This guy asked the same question (the answer is yes) link to this video

u/Elevate24in r/typescript • Mentions

On “TypeScript types can run DOOM”

link to this video

u/Fidodoin r/typescript • Mentions

On “Can TypeScript run DOOM?”

Since this was posted somebody did do it and they are indeed legendary, and even that is an understatement.

u/Aggressive_Health487in r/typescript • Mentions

On “Can TypeScript run DOOM?”

>you could type WASD in a string and get a new result from the language server after every one, but you would hit TypeScript's recursion depth limit around \~1500 characters >I'm sure it would be astronomically slow >hard to get it to display well in the intellisense popups >you'd have to implement basic arithmetic from scratch on number strings or digit arrays I like how all of what you said is true but it didn't actually stop the guy who did it lmao.