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

isLeft

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

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

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

const result = E.left("error");
if (E.isLeft(result)) {
  console.log("Error:", result.left);
}
function isLeft<L, R>(m: Either<L, R>): m is Left<L>;
§
isLeft<L, R>(m: Either<L, R>): m is Left<L>
[src]

§Type Parameters

§Parameters

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

§Return Type

§
m is Left<L>
[src]