variable Unknown

The failure from() produces for a throwable that is not already a Failure.

import * as Failure from './failure.ts';

Failure.Unknown.is(Failure.from('nope')); // true — and the original string is preserved under `.cause`

Type

FailureFactory<"Unknown", { thrown: unknown; }>

Usage

import { Unknown } from "lib/result/failure.ts";