import type { SchemaDefinition } from './model.js'; /** Definition key → keys of the other definitions in the same set it references. */ export type DependencyGraph = ReadonlyMap>; /** * Edges from every definition to the definitions it reads, restricted to the * given set. Expects canonical definitions (`canonicalizeDefinitions`). */ export declare function buildDependencyGraph(definitions: SchemaDefinition[]): DependencyGraph; /** * Stable topological order. Items whose prerequisites are all placed keep their * input order; an item moves behind every prerequisite found in `items`. * Members of a dependency cycle stay together in input order, and whatever * depends on the cycle comes after all of them. */ export declare function orderByDependencies(items: readonly T[], keyOf: (item: T) => string, prerequisitesOf: (key: string) => Iterable): T[]; /** Reverses every edge: key → keys of the definitions that reference it. */ export declare function invertDependencyGraph(graph: DependencyGraph): DependencyGraph; //# sourceMappingURL=object-dependencies.d.ts.map