Skip to content

Comment on Show HN: Conway's Game of Life in TypeScript's type systemparent

Comments

Typescript has conditional types, which means it can be used as a programming language itself. In theory you can write any arbitrary program - game of life is just an example. You have to define numbers and arithmetics from scratch though, so it is not very practical.

Conditional types are probably rarely used in practial code, but it opens the door for a lot of geekery.

We’re using conditional types for type inference in garph (https://garph.dev)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.