import type { ISharedModuleRegistry } from "../types"; /** * Simple shared module registry implementation. * Created internally by Sandlot from the sharedModules option. * * Each registry instance has a unique key (e.g., `__sandlot_abc123__`) that * isolates it from other Sandlot instances. This allows multiple Sandlot * instances to run concurrently with separate shared module configurations. * * The registry must be exposed globally for bundled code to access shared modules * at runtime. Call `exposeGlobally()` after creation, or use `createSharedModuleRegistry()` * which does this automatically. */ export declare class SharedModuleRegistry implements ISharedModuleRegistry { private modules; private exportNamesMap; private _registryKey; constructor(modules: Record); /** * The unique global key where this registry is exposed. * Bundled code accesses the registry via `globalThis[registryKey]`. */ get registryKey(): string; /** * Expose this registry globally so bundled code can access shared modules. * This sets globalThis[this.registryKey] = this. */ exposeGlobally(): this; /** * Remove this registry from global scope. */ removeFromGlobal(): void; get(moduleId: string): unknown; has(moduleId: string): boolean; getExportNames(moduleId: string): string[]; list(): string[]; private introspectExports; private isValidIdentifier; } /** * Create a shared module registry from a modules object. * Automatically exposes the registry globally for bundled code to access. * Returns null if no modules are provided. */ export declare function createSharedModuleRegistry(modules?: Record): SharedModuleRegistry | null; //# sourceMappingURL=shared-module-registry.d.ts.map