Blogmark

Playing Sudoku in TypeScript while the type checker highlights mistakes

via jbranchaud@gmail.com

https://github.com/gruhn/typescript-sudoku

It's always fascinating to see the over-the-top ways people (ab)use the TypeScript type checker to do things it was never meant to do.

This is an experiment to precisely define a Sudoku type. The goal is that we can play Sudoku in TypeScript while the type checker complains about mistakes. This is not about implementing a Sudoku solver. Just about writing unnecessarily complicated type definitions.