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

getShowableEither

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

Create a Showable instance for Either given Showable instances for both Left and Right types.

@example
import * as E from "./either.ts";
import * as S from "./string.ts";
import * as N from "./number.ts";

const showableEither = E.getShowableEither(S.ShowableString, N.ShowableNumber);

const result1 = showableEither.show(E.right(42));
// "Right(42)"

const result2 = showableEither.show(E.left("error"));
// "Left(error)"
function getShowableEither<A, B>(SB: Showable<B>, SA: Showable<A>): Showable<Either<B, A>>;
§
getShowableEither<A, B>(SB: Showable<B>, SA: Showable<A>): Showable<Either<B, A>>
[src]

§Type Parameters

§Parameters

§Return Type