Core exports - Types, Result<T,E>, errors, and logger Split from index.ts for file size compliance (Issue #285)
Creates a failed Result containing the given error.
The error value type
The error value
A Result in the Err state
const result = err(new Error('not found'));if (!result.ok) { console.error(result.error.message); // "not found"} Copy
const result = err(new Error('not found'));if (!result.ok) { console.error(result.error.message); // "not found"}
Core exports - Types, Result<T,E>, errors, and logger Split from index.ts for file size compliance (Issue #285)