import type { Module } from './types.js'; /** * Modules API registry. * * Each registry is an opaque value produced by the owning module's * `ApiField.createRegistry` and written to by every contributor's * `ApiField.register`. Keyed by `(moduleName, fieldName)` to keep field names * scoped to their owning module. */ export interface ModulesApiRegistry { /** Returns the registry for a module's API field, or `undefined` if absent. */ get(moduleName: string, fieldName: string): unknown; /** Whether the given module's API field has a registry in this store. */ has(moduleName: string, fieldName: string): boolean; } /** Result of building a module registry from a set of user-provided modules. */ export interface ModulesRegistry { /** Registered modules array (in topological order) */ modules: Module[]; /** Modules api registry. */ apiRegistry: ModulesApiRegistry; } /** * Builds a per-`ModuleProvider` registry from the given user-provided modules. * * - Always includes `CoreModule`. * - Builds and validates the module graph (`buildModuleGraph`). * - Creates a fresh registry per API field via `ApiField.createRegistry`. * - Applies every contribution in topological order via `ApiField.register`. */ export declare const buildModuleRegistry: (modules?: ReadonlyArray) => ModulesRegistry;