import { getComparable } from "https://deno.land/x/fun@v2.0.0/newtype.ts";
Retype an existing Comparable from an inner type to a Newtype.
Examples
Example 1
Example 1
import { Newtype, getComparable } from "./newtype.ts";
import * as N from "./number.ts";
type Integer = Newtype<'Integer', number>;
const eqInteger = getComparable<Integer>(N.ComparableNumber);
Type Parameters
T extends AnyNewtype
Parameters
eq: Comparable<ToValue<T>>