Catalogtypetype Catalog = {
readonly tools: ReadonlyMap<ToolName, Tool>;
/** The names in an order where each comes after the tools it needs. */
readonly sequence: readonly ToolName[];
};A catalog.
A catalog: the tools of a fleet or a work, each once, with every need among them and no cycle, in an order where each tool comes after the tools it needs. It is the one place a pin and a hash are written.
import { defineCatalog } from "./catalog.ts";
// defineCatalog([jq, git]) is a Result of a catalog in the order of needsCatalogtypetype Catalog = {
readonly tools: ReadonlyMap<ToolName, Tool>;
/** The names in an order where each comes after the tools it needs. */
readonly sequence: readonly ToolName[];
};A catalog.
defineCatalogfunctionfunction defineCatalog(tools: readonly Tool[]): Result<Catalog, readonly string[]>A catalog from tools, or every reason it is not one.