/** Project-wide registry of exported KERN module metadata. Built once before * the compile loop; consulted per-file via a * caller-specific `ImportResolver` that resolves `use path="…"` strings * against the current module's directory. * * Scope: records exported symbol kinds for target-aware import lowering, and * still indexes Result/Option-returning fns for `?` / `!` propagation. */ import { type ImportResolver, type IRNode, type ModuleExports } from '@kernlang/core'; /** Walk every `.kern` file in the project once and produce a * `Map`. Files that fail to parse are * skipped silently — their per-file compile will surface its own errors. */ export declare function buildCrossModuleRegistry(kernFiles: readonly string[]): Map; /** Build a per-file `ImportResolver` that maps `use path="…"` strings to * the corresponding `ModuleExports`. Resolves relative paths against the * current file's directory and accepts both `./helper` and `./helper.kern` * forms (preserving parity with KERN's import syntax). Bare imports * (`zod`, `react`, …) and unresolvable paths return `null`, leaving the * call to pass through propagation unchanged. */ export declare function makeImportResolverForFile(currentFileAbs: string, registry: Map): ImportResolver; /** Index every emittable type declaration (interface/union/type) in each * project file, keyed by absolute path → simple type name → IR node. Feeds * the shadow analyzer's real-type emission so a `<<< >>>` fence that touches * an imported domain type is checked against its true shape rather than an * `any` stub. First declaration wins on a same-file name clash. Parse * failures are skipped — the per-file compile surfaces its own diagnostics. */ export declare function buildProjectTypeNodeIndex(kernFiles: readonly string[]): Map>; /** Resolve the emittable type declarations a file pulls in via `use path="…"` * imports, keyed by the LOCAL name (honoring `from … as alias`). Direct * imports only: a type reached through a re-export barrel isn't followed and * degrades to an `any` stub in the shadow support file, which is safe — it * weakens checking, never introduces a false positive. */ export declare function resolveImportedTypeNodesForFile(currentFileAbs: string, root: IRNode, typeIndex: Map>): Map;