import type { TypeId } from "../navigation"; import type { TypeDefinition } from "./latest"; import type { TypeShapeOrReference } from "./types"; interface CollectReferencedTypeIdsOptions { maxDepth?: number; } /** * Collects all TypeIds that are referenced (directly or transitively) from a given type shape. * This is useful for filtering down a large types map to only the types needed for rendering * a specific schema, significantly reducing payload size. * * @param type - The root type shape to start traversal from * @param types - The full map of all type definitions * @param options - Optional configuration (maxDepth defaults to 10) * @returns A Set of TypeIds that are referenced from the root type */ export declare function collectReferencedTypeIds(type: TypeShapeOrReference, types: Record, { maxDepth }?: CollectReferencedTypeIdsOptions): Set; /** * Filters a types map to only include types that are referenced from the given root type. * This is a convenience function that combines collectReferencedTypeIds with filtering. * * @param rootType - The root type shape to start traversal from * @param types - The full map of all type definitions * @param options - Optional configuration (maxDepth defaults to 10) * @returns A filtered types map containing only referenced types */ export declare function filterReferencedTypes(rootType: TypeShapeOrReference, types: Record, options?: CollectReferencedTypeIdsOptions): Record; export {}; //# sourceMappingURL=collect-referenced-types.d.ts.map