3 ms·
I have already considered using Errors in return type unions, that is function getIntOrFailMiserably(): number | Error { .. } Is that really the
by raydiatian 4y ago
I have already considered using Errors in return type unions, that is
function getIntOrFailMiserably(): number | Error {
..
}
Is that really the best there is? Obviously, I can't control OPC (other people's code. you down with OPC? yeah you know me) with this, unless I wrap it and search like a hawk for the error.
- TechBro8615 4y agoYou might like fp-ts and its Result type.