recordAt

tcmts.cli.libraries.recordAt · #n4zn4jz2 · term · runs anywhere

The entries of the record at record on this branch (none if there's none).

import { parseRecord } from "#codebase/tcmts/cli/libraries";
import type { LibraryEntry } from "#codebase/tcmts/cli/libraries";
import type { Store } from "#codebase/tcmts/store";

export function recordAt(store: Store, record: string): Record<string, LibraryEntry> {
  const [h] = store.hashesAt(record);
  return h ? parseRecord(store.getDef(h)?.sourceText ?? "") : {};
}

uses

used by