Skip to main content
Module

x/fun/decoder.ts>wrapErr

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 wrapErr
import { wrapErr } from "https://deno.land/x/fun@v2.0.0-alpha.12/decoder.ts";

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