Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

fail

import { fail } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/either.ts";

Construct a Left value from an error. This is an alias for left and is commonly used in contexts where you want to emphasize failure.

@example
import * as E from "./either.ts";

const result = E.fail("Operation failed");
// { tag: "Left", left: "Operation failed" }
function fail<A = never, B = never>(b: B): Either<B, A>;
§
fail<A = never, B = never>(b: B): Either<B, A>
[src]

§Type Parameters

§
A = never
[src]
§
B = never
[src]

§Parameters

§Return Type