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