import { type Union } from "https://deno.land/x/ts_toolbelt_unofficial@1.1.0/mod.ts";
const { Last } = Union;
Get the last item within an [[Union]] (⚠️ it might not preserve order)
definition: IntersectOf<U extends unknown ? (x: U) => void : never> extends (x: infer P) => void ? P : never