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
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.