import type { TemplateCall } from "../qualify/template-provider.js"; import type { TagNode } from "../minijinja/tag-ast.js"; /** Where the caret sits inside a jinja call tag. NEUTRAL, the callee is a bare string; the dbt * meaning of the slot (ref arg0 = a model) is the consumer's to apply. */ export interface JinjaSlot { /** The callee name, e.g. `"ref"`, `"source"`, `"my_macro"`. */ callee: string; /** Dotted package before the callee (`dbt_utils` in `dbt_utils.star(...)`). */ packageName?: string; /** The WHOLE parsed call (issue #37): name, packageParts and every sibling arg's literal value * (null where computed) — the same TemplateCall shape every provider method receives. A slot's * candidates can depend on the other args (source('raw', '|')'s candidates are the tables OF * raw), so the provider callback gets the call, not just the callee name. */ call: TemplateCall; /** 0-based index of the positional arg the caret is in. The callee-name slot (caret still in the * callee identifier, `{{ my_mac|`) is `-1`. */ argIndex: number; /** The already-typed text of this slot up to the caret, quote-stripped, the prefix a consumer * filters its candidates by. Empty when the slot is untyped (`{{ ref(|`). */ prefix: string; /** True when the slot is unclosed / mid-typing (an `incomplete` call node, or a bare callee with no * open paren yet). */ incomplete: boolean; } /** * The jinja completion slot at `offset`, or undefined when the caret is not in a completable jinja * position. `tags` is `parseTemplated(...).tags` (or `doc.templated.tags`); `text` is the document * source. Reuses the already-computed tags; never re-parses. */ export declare function jinjaSlotAt(tags: readonly TagNode[], text: string, offset: number): JinjaSlot | undefined;