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

x/hkts/schemable/decode_error.ts>fold

Functional programming tools: option, either, task, state, optics, etc.
Latest
variable fold
import { fold } from "https://deno.land/x/hkts@v0.0.52/schemable/decode_error.ts";

Destructors


type

<E, R>(patterns: { Leaf: (input: unknown, error: E) => R; Key: (
key: string,
kind: Kind,
errors: Free<DecodeError<E>>,
) => R; Index: (
index: number,
kind: Kind,
errors: Free<DecodeError<E>>,
) => R; Member: (index: number, errors: Free<DecodeError<E>>) => R; Lazy: (id: string, errors: Free<DecodeError<E>>) => R; Wrap: (error: E, errors: Free<DecodeError<E>>) => R; }
) => ((e: DecodeError<E>) => R)