Represents a Result that can never be an Err. The error type is never, meaning the operation is infallible.
Result
Err
never
This type is useful for:
intoOk()
The type of the value that is always produced.
1.8.0
Result.intoOk
function getDefaultConfig(): SafeResult<Config> { return Ok({ timeout: 3000, retries: 3 });}const config = getDefaultConfig().intoOk(); // Safe, no unwrap needed Copy
function getDefaultConfig(): SafeResult<Config> { return Ok({ timeout: 3000, retries: 3 });}const config = getDefaultConfig().intoOk(); // Safe, no unwrap needed
Represents a
Resultthat can never be anErr. The error type isnever, meaning the operation is infallible.This type is useful for:
Resultfor API consistencyintoOk()without runtime checks