Skip to main content
Module

x/fun/mod.ts>decoder.unknown

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Go to Latest
variable decoder.unknown
import { decoder } from "https://deno.land/x/fun@v.2.0.0-alpha.11/mod.ts";
const { unknown } = decoder;

A Decoder that always returns true and casts the result to unknown.

Examples

Example 1

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

const result1 = D.unknown(null); // Right(null)
const result2 = D.unknown("Brandon"); // Right("Brandon")

type

Decoder<unknown, unknown>