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

x/fun/mod.ts>decoder.success

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.success
import { decoder } from "https://deno.land/x/fun@v.2.0.0-alpha.11/mod.ts";
const { success } = decoder;

Construct a Decoded from a value A.

Examples

Example 1

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

const result1 = D.success(1); // Decoder<number>;
const result2 = D.success("Hello"); // Decoder<string>;