Mimicking Rust's Result type in TypeScript | Hacker News Reader