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

isRight

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

Type guard that checks if an Either is a Right value.

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

const result = E.right(42);
if (E.isRight(result)) {
  console.log("Success:", result.right);
}
function isRight<L, R>(m: Either<L, R>): m is Right<R>;
§
isRight<L, R>(m: Either<L, R>): m is Right<R>
[src]

§Type Parameters

§Parameters

§
m: Either<L, R>
[src]

§Return Type

§
m is Right<R>
[src]