Extreme Typing in TypeScript

from blog Schemescape, | ↗ original
Solving a Project Euler problem entirely within TypeScript's type system. Because I couldn't not do it!