Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/fun/decoder.ts>unionErr

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Latest
function unionErr
import { unionErr } from "https://deno.land/x/fun@v2.0.0/decoder.ts";

Construct a Union from two or more DecodeErrors.

Examples

Example 1

import * as D from "./decoder.ts";

const result = D.unionErr(
  D.leafErr(1, "expected string"),
  D.leafErr(1, "expected array"),
);

Parameters

...errors: readonly [DecodeError, DecodeError, ...DecodeError[]]

Returns

DecodeError