Similar to Rust's Result<(), E>.
Result<(), E>
The type of the error that may be produced by a failed operation.
1.4.0
function saveData(data: string): VoidResult<Error> { if (!data) { return Err(new Error('Empty data')); } localStorage.setItem('data', data); return Ok();} Copy
function saveData(data: string): VoidResult<Error> { if (!data) { return Err(new Error('Empty data')); } localStorage.setItem('data', data); return Ok();}
Similar to Rust's
Result<(), E>.