Interface: Err<T>
Defined in: index.ts:47
Represents an error result containing an error value.
This interface is part of a discriminated union with Ok to create the Result type. Use the err() function to create instances rather than constructing manually.
Example
typescript
const result: Err<string> = err("Something went wrong");
console.log(result.success); // false
console.log(result.error); // "Something went wrong"Type Parameters
T
T = any
The type of the error data
Properties
error
readonlyerror:T
Defined in: index.ts:49
success
readonlysuccess:false
Defined in: index.ts:48