import { ResolveMap } from './ImportResolutionMap.js'; import { GeneratorExport, GeneratorModule, ModuleExport, ModuleRegistry } from './ModuleRegistry.js'; import { TextExport, TextModule } from './ParseModule.js'; /** parse wgsl files and provided indexed access to modules and exports */ export declare class ParsedRegistry { registry: ModuleRegistry; conditions: Record; private textModules; constructor(registry: ModuleRegistry, conditions?: Record); link(moduleSpecifier: string): string; /** parse one module, register exports for later searching */ private parseOneModule; /** @return a ResolveMap to make it easier to resolve imports from the provided module */ importResolveMap(importingModule: TextModule): ResolveMap; /** @return a ModuleExport if the provided pathSegments * reference an export in a registered module */ getModuleExport(importingModule: TextModule, // TODO drop this and require pathSegments to be absolute pathSegments: string[]): ModuleExport | undefined; private findExport; findModule(moduleSpecifier: string): TextModule | GeneratorModule | undefined; /** * Find a text module by module specifier * @param packageName requesting package name (for resolving relative paths) */ findTextModule(moduleSpecifier: string, packageName?: string): TextModule | undefined; } export declare function exportName(exp: TextExport | GeneratorExport): string;