Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fun/mod.ts>decoder.wrapErr

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

Construct a Wrap from context and an existing DecodeError.

Examples

Example 1

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

const result = D.wrapErr(
  "expected password",
  D.leafErr(1, "expected string")
);

Parameters

context: string