import type { AgencyNode } from "../types.js"; import type { HoistPosition } from "../preprocessors/hoistPositions.js"; import { type DiagnosticName } from "./diagnostics.js"; import type { TypeCheckError } from "./types.js"; /** The diagnostic to report for each status the hoist pass cannot lift from. */ export type RefusalTable = { stuck: DiagnosticName; outsideBodies: DiagnosticName; handlerBody: DiagnosticName; }; /** * One diagnostic per node that `isTarget` picks out and that sits where the * hoist pass cannot lift it. `table` names the diagnostic for each status and * `params` supplies that diagnostic's parameters. The checked cast and the `?` * operator both refuse the same three statuses, so the loop lives once here. */ export declare function positionRefusals(positions: HoistPosition[], isTarget: (node: AgencyNode) => node is T, table: RefusalTable, params: (node: T) => Record): TypeCheckError[];