Skip to main content
Module

x/fun/decoder.ts>isMany

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Go to Latest
function isMany
import { isMany } from "https://deno.land/x/fun@v.2.0.0-alpha.11/decoder.ts";

A refinement that returns true when a DecodeError is a Many.

Examples

Example 1

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

const result1 = D.isMany(D.intersectionErr(
  D.leafErr(1, "expected null"),
  D.leafErr(1, "expected string")
)); // false
const result2 = D.isMany(D.manyErr()); // true