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

wrap

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

Construct a Right value from a value. This is an alias for right and is commonly used in contexts where you want to emphasize wrapping a value.

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

const result = E.wrap(42);
// { tag: "Right", right: 42 }
function wrap<A, B = never>(a: A): Either<B, A>;
§
wrap<A, B = never>(a: A): Either<B, A>
[src]

§Type Parameters

§
B = never
[src]

§Parameters

§Return Type