import * as ts from 'typescript'; import { ComponentRegistry } from './registry.js'; /** Recursively collect all DeferredBlock nodes from a template AST. */ export declare function collectDeferBlocks(nodes: any[]): any[]; /** Collect element tag names from template AST nodes recursively. */ export declare function collectElementNames(nodes: any[]): Set; /** Information about how a class is imported. */ export interface ImportInfo { /** Module path from the import statement. */ path: string; /** Whether the class was imported as a default import (`import X from`). */ isDefault: boolean; /** * Original exported name on the source module's namespace. For * `import { HeavyWidget as Widget } from './heavy'`, the local * binding is `Widget` but the namespace exposes `HeavyWidget` — * `await import('./heavy')` returns `{ HeavyWidget }`, not * `{ Widget }`. Defer dependency emit must use the exported name, * not the local alias, or the lookup resolves to `undefined` at * runtime. */ exportName: string; } /** * Build import info map: localName → { path, isDefault, exportName } * from source file imports. Tracks default vs named imports plus the * original exported name so the defer dependency generator can emit * `import('./p').then(m => m.default)` for default imports and * `import('./p').then(m => m.OriginalExportName)` for aliased named * imports. */ export declare function buildImportMap(sf: ts.SourceFile): Map; /** * Build defer block dependency map with dynamic import() expressions. * * For each defer block, identifies which imported components are only used * inside defer blocks (not in the eager template), and generates dynamic * import expressions for lazy loading. * * Returns: * - blocks: Map for compileComponentFromMetadata * - deferredImports: Set of class names that should be removed from static imports */ export declare function buildDeferDependencyMap(parsedTemplate: any, sourceFile: ts.SourceFile, registry: ComponentRegistry | undefined, localSelectors: Map): { blocks: Map; deferredImports: Set; };