A text adventure game on TypeScript's type system

by cacozenon 9/21/2022, 7:51 PMwith 31 comments

by bilalqon 9/21/2022, 8:29 PM

I never get tired of seeing fun little things like this. Is there a way to make VSCode not truncate the type info?

by JohnDotAwesomeon 9/21/2022, 9:30 PM

For those wanting a TS Playground link: https://tinyurl.com/mw6pbpht

by footaon 9/21/2022, 9:25 PM

What the fuck

by cercatrovaon 9/21/2022, 9:38 PM

Related, discussed previously, Type-Level TypeScript: https://news.ycombinator.com/item?id=32913125

by durnygburon 9/22/2022, 7:56 AM

So which one should now one study - TypeScript type system, RxJS operators, or the next generation of vomit produced by the Angular team? Together they compose extremely unfunny clusterfuck. For now my CVs all fall into a black hole, you better not fall off the employment train.

by koshergweiloon 9/21/2022, 10:50 PM

An interesting tidbit that I found in the source code is that it only accepts integers from 1 to 20. Perfectly sufficient for its use case, although not quite extendable as I would hope

by noduermeon 9/21/2022, 9:36 PM

This is neat. Can someone explain why the generic types extending string need to default to any in all these cases, like: `TDescription extends string = any` ?

by dschuessleron 9/21/2022, 8:45 PM

What a beautiful little treat. For everyone curious, it took me less than ten minutes to play through. Well done!

by wildgeodudeon 9/22/2022, 7:22 AM

This is really neat, thanks!

by have_faithon 9/21/2022, 8:23 PM

How do you play the game?

by notjustanymikeon 9/21/2022, 9:04 PM

Weirdly, a spider killing me isn't the worst thing I've seen written in Typescript.