usesOf

tcmts.cli.placement.usesOf · #5qys5pua · term · runs anywhere

References to a definition other than as a JSX tag: calls, reads, passing it along.

export function usesOf(rec: { spans: { hash?: string; pos: string; element?: boolean }[] }, self: string): Set<string> {
  const out = new Set<string>();
  for (const s of rec.spans) if (s.hash && s.hash !== self && s.pos === "value" && !s.element) out.add(s.hash);
  return out;
}

used by