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

x/fun/mod.ts>refinement.id

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

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.