Skip to main content
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.
Go to Latest
function id
import { id } from "https://deno.land/x/fun@v.2.0.0-alpha.11/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.