import type { SyntaxNode } from "../../../../infrastructure/parser/ts-utils.js"; import type { GoImportIndex } from "../../index/go/imports.js"; import type { GoPackageIndex } from "../../index/go/packages.js"; import type { RouterRecord } from "./router-record.js"; import type { RouterValue } from "./router-scope.js"; export type CalleeDeclaration = { readonly declaration: SyntaxNode; readonly relPath: string; readonly directory: string; readonly imports: GoImportIndex; }; export type CalleeLookup = { readonly imports: GoImportIndex; readonly directory: string; readonly packages: GoPackageIndex; /** The declaration the call sits in, for reading a receiver's type. */ readonly scope: SyntaxNode; }; export type GoParameter = { readonly name: string; readonly type: string; }; /** * Positional parameters in declaration order. Go lets one declaration name * several parameters of one type, and each of them is its own position. */ export declare function parametersOf(declaration: SyntaxNode): readonly GoParameter[]; /** A stable key for the router values and records a call seeds a body with. */ export declare function seedSignature(seeds: readonly { readonly index: number; readonly value: RouterValue | null; readonly record: RouterRecord | null; }[]): string; /** * The declaration a call names, resolved structurally: a function of this * package, a function of an imported one, or a method on a receiver whose * declared type the enclosing declaration fixes. */ export declare function calleeOf(call: SyntaxNode, lookup: CalleeLookup): CalleeDeclaration | null;