Skip to main content
Module

x/fun/mod.ts>decoder.intersectionErr

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

Construct an Intersection from two or more DecodeErrors.

Examples

Example 1

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

const result = D.intersectionErr(
  D.leafErr(1, "expected noninit string"),
  D.leafErr(1, "expected string with no spaces"),
);

Parameters

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