import type { ParsedFile } from "../../../../core/ports/parser.port.js"; import { type SyntaxNode } from "../../../../infrastructure/parser/ts-utils.js"; export type GoTypeDeclaration = { readonly name: string; /** Types embedded without a field name, which is how Go composes behavior. */ readonly embedded: readonly string[]; /** Named fields with their declared type as written in this package. */ readonly fields: ReadonlyMap; }; export type GoDeclarationIndex = { constOf(name: string): SyntaxNode | null; typeOf(name: string): GoTypeDeclaration | null; /** The declared result type of a package-level function, unqualified. */ resultOf(name: string): string | null; /** The declaration of a package-level function, for a constructor summary. */ functionOf(name: string): SyntaxNode | null; /** The declaration of a method, keyed on its receiver's unpointered type. */ methodOf(receiverType: string, name: string): SyntaxNode | null; /** * The file a declaration was read from, keyed the way it was stored: a * syntax node is a fresh wrapper on every access, so it cannot be a key. */ fileOf(key: string): string | null; }; export declare function goDeclarationIndex(files: readonly ParsedFile[]): GoDeclarationIndex;