import { type Predicate } from "https://deno.land/x/arktype@v1.0.10-alpha/nodes/predicate.ts";
If scope is provided, we also narrow each predicate to match its domain. Otherwise, we use a base predicate for all types, which is easier to manipulate.
definition: string extends keyof $ ? true | CollapsibleList<Branch> : true | CollapsibleList<Branch<domain, $>>