Mimicking Rust's Result type in TypeScript
dev.to