Skip to main content
Module

x/fun/decoder.ts>fromDecodeError

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

Construct a Decoded from a DecodeError. This allows one to construct a Decoded failure directly from DecodeErrors other than Leaf.

Examples

Example 1

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

const result1 = D.fromDecodeError(D.wrapErr(
  "decoding password",
  D.leafErr(1, "string"),
));

Type Parameters

optional
A = never