Using TypeScript to make invalid states irrepresentable | Hacker News Reader