Skip to main content
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.
Go to Latest
function decoder.wrapErr
import { decoder } from "https://deno.land/x/fun@v2.0.0-alpha.12/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