Rust-inspired Result and Option types for TypeScript, enabling type-safe error handling and null safety