import { type TSetIntersect } from "https://deno.land/x/typebox@0.34.0/src/type/sets/set.ts";
definition: (T extends [infer L extends PropertyKey, ...infer R extends PropertyKey[]] ? TSetIncludes<S, L> extends true ? TSetIntersect<R, S, [...Acc, L]> : TSetIntersect<R, S, [...Acc]> : Acc)