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/sync_either.ts";

Create a SyncEither that always fails with the given error.

@example
import { fail } from "./sync_either.ts";

const failure = fail("Something went wrong");
const result = failure(); // Left("Something went wrong")
function fail<A = never, B = never>(b: B): SyncEither<B, A>;
§
fail<A = never, B = never>(b: B): SyncEither<B, A>
[src]

§Type Parameters

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

§Parameters

§Return Type