/type-level-fizzbuzz

Type Level FizzBuzz in TypeScript

Primary LanguageTypeScript

Type Level FizzBuzz in TypeScript

Not a line of JavaScript will be generated by compiling the code in fizzbuzz.ts everything that happens it happens at compile time.

The goal was to implement the FizzBuzz Kata using only TypeScript type checker.

What it means is that all the calculations needed to solve the Kata are done by creating types from other types until we have a type that is the FizzBuzz solution.

You can find some of the capabilities used in the following pages of TypeScript official documentation:

This exercise is not meant to be of any use if not to explore what you can do and learn techniques that can be used in real life situations.

If you don't have time to setup a local development environment here's a Playground. To see representation of the types bring the pointer over the name of the type or the type expression. You can view the FizzBuzz solution by bringing the pointer over the type _00717.