import type { AgencyConfig } from "../config/config.js"; import type { AgencyNode } from "../types.js"; import type { SourceLocation } from "../types/base.js"; import type { TypeCheckerContext } from "./types.js"; /** A name a template uses but does not define. */ export type UndefinedTemplateName = { name: string; loc: SourceLocation | null; }; /** * Names a template uses that it does not define. * * A template body is analysed as if it were its own file, because that is * what it becomes. `toSource` prints it, `runCode` compiles the print, and * the surrounding file is not there. So this takes `config` and nothing * else from the caller: there is no host context to leak from. * * A template may use language builtins and JS globals, the prelude, and * whatever it declares or imports itself. */ export declare function findUndefinedTemplateNames(nodes: AgencyNode[], config: AgencyConfig, options?: { includeTypeNames?: boolean; }): UndefinedTemplateName[]; /** * AG8015 — report every name a template uses but does not define. * * Always on, unlike the ordinary undefined-name checks. A template is * printed, compiled and run elsewhere, so nothing downstream catches this * before run time. */ export declare function checkTemplateNames(ctx: TypeCheckerContext): void;