Settings

Theme

Show HN: A Sudoku solver in TypeScript's type system

tsplay.dev

3 points by candleknight 2 years ago · 1 comment · 1 min read

Reader

GitHub: https://github.com/RuyiLi/cursed-typescript/blob/master/rand...

Hi HN! I wrote a small file that solves sudoku puzzles at the type level - that is, entirely within TypeScript's type system, with no runtime code.

To play with it, scroll down to the bottom (below where it says "BEGIN TESTING") and check out the examples. You can "run" the solver by hovering over the name of the type (e.g. SudokuEasySolved).

Also, if you haven't seen it already, I did the same thing with Conway's Game of Life: https://news.ycombinator.com/item?id=37438028 :)

quickthrower2 2 years ago

Could someone make a Typescript (runtime) to Typescript (types) compiler I wonder.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection