dependents

tcmts.cli.main.dependents · #sscqltkb · term · runs on the server

uses tcmts.cli.style.dim, which uses node:util

What uses a definition now: the named definitions that refer to it (not the earlier versions of them, which the codebase keeps too), by name.

import type { Codebase } from "#codebase/tcmts/cli/codebase";
import { dim } from "#codebase/tcmts/cli/style";

export function dependents(cb: Codebase, target: string) {
  const names = cb.store
    .namedDependents(cb.lookupOne(target))
    .flatMap((h) => cb.store.pathsOf(h))
    .sort();
  if (!names.length) return console.log(dim("no dependents"));
  for (const n of names) console.log(n);
}

uses

used by