/** * Generic lexicon-based LSP completion and hover providers. * * Provides LexiconIndex for looking up resources/properties by class name, * and helper functions that implement the common completion/hover patterns * shared across lexicons. */ import type { CompletionContext, CompletionItem, HoverContext, HoverInfo } from "./types.js"; export interface LexiconEntry { resourceType: string; kind: "resource" | "property"; lexicon: string; attrs?: Record; propertyConstraints?: Record; createOnly?: string[]; writeOnly?: string[]; primaryIdentifier?: string[]; deprecatedProperties?: string[]; conditionalCreateOnly?: string[]; replacementStrategy?: "delete_then_create" | "create_then_delete"; tagging?: { taggable: boolean; tagOnCreate: boolean; tagUpdatable: boolean; }; } /** * Indexed access to lexicon entries for LSP features. */ export declare class LexiconIndex { private entries; constructor(entries: Record); /** All resource class names with their backing type names. */ getResourceNames(): Array<{ className: string; resourceType: string; }>; /** Property names available on a given resource class. */ getPropertyNames(className: string): string[]; /** Look up a single entry by class name. */ getEntry(name: string): LexiconEntry | undefined; } /** * Provide completions from a lexicon index. * * Handles two contexts: * - After `new ` — suggests resource class names * - Inside constructor props — suggests property names * * @param importSource - Human-readable source label for documentation * (e.g. "AWS CloudFormation resource") */ export declare function lexiconCompletions(ctx: CompletionContext, index: LexiconIndex, importSource: string): CompletionItem[]; /** * Provide hover information from a lexicon index. * * @param formatHover - Lexicon-specific hover content formatter. * If not provided, uses a generic format. */ export declare function lexiconHover(ctx: HoverContext, index: LexiconIndex, formatHover?: (className: string, entry: LexiconEntry) => HoverInfo | undefined): HoverInfo | undefined; //# sourceMappingURL=lexicon-providers.d.ts.map