Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/fun/refinement.ts>id

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

Create a identity refinement that always returns true as at the type level a type A is always a type A.

Examples

Example 1

import * as R from "./refinement.ts";

const number = R.id<number>();

const result = number(1); // true.. but only numbers can be passed here.