import type { CelNode } from "@telorun/analyzer"; /** One identifier of a dotted CEL chain, with the span a cursor hit-tests * against and a rename replaces. */ export interface ChainPart { name: string; range: [number, number]; } /** * Flatten `a.b.c` into its identifiers. Returns undefined as soon as the chain * is rooted in something other than a plain identifier (a call, an index), so a * navigable — or renameable — prefix is never invented out of a computed * expression. */ export declare function flattenChain(node: CelNode): ChainPart[] | undefined; /** * A node's children. * * Exhaustive by construction: a new `CelNode` variant fails the build here * rather than silently going unwalked, so the analyzer's node model and the * walks over it cannot drift apart unnoticed. That matters twice over — for * go-to-definition an unwalked variant is a missed jump, for a rename it is a * reference left pointing at the old name. */ export declare function celChildren(node: CelNode): CelNode[]; /** Every node of the tree, outermost first. */ export declare function walkCel(node: CelNode, visit: (node: CelNode) => void): void; /** * The dotted chain under `offset`, and which of its identifiers was hit. The * walk is outermost-first so the longest chain wins — `resources.store.conn` * resolves as one chain rather than as its `resources.store` prefix. */ export declare function chainAt(node: CelNode, offset: number): { parts: ChainPart[]; index: number; } | undefined; //# sourceMappingURL=cel-chain.d.ts.map