Effection Logo

function Err

thefrontside/effection

function Err<T>(cause: unknown): Result<T>

Construct a failed Result.

Example

import { Err } from 'effection';

let result = Err(new Error("oh no"));
// { ok: false, error: Error("oh no") }

Type Parameters

T

Parameters

cause: unknown

Return Type

Result<T>