import { newtype } from "https://deno.land/x/fun@v2.0.0-alpha.6/mod.ts";
const { getOrd } = newtype;
Retype an existing Ord from an inner type to a Newtype.
Examples
Example 1
Example 1
import { Newtype, getOrd } from "./newtype.ts";
import * as N from "./number.ts";
type Integer = Newtype<'Integer', number>;
const ordInteger = getOrd<Integer>(N.OrdNumber);
Type Parameters
T extends AnyNewtype