import { type PredicateType } from "https://deno.land/x/unknownutil@v3.18.0/is.ts";
A type predicated by Predicate.
import { is, type PredicateType } from "@core/unknownutil";
const isPerson = is.ObjectOf({
name: is.String,
age: is.Number,
address: is.OptionalOf(is.String),
});
type Person = PredicateType<typeof isPerson>;
// Above is equivalent to the following type
// type Person = {
// name: string;
// age: number;
// address: string | undefined;
// };