import type { CompletionExpressionMetadata, Expression, InterpreterContext } from "@hylimo/core"; import { ExecutableExpression } from "@hylimo/core"; /** * An expression which throws an CompletionError on evaluation */ export declare class ExecutableCompletionExpression extends ExecutableExpression> { readonly isAccess: boolean; readonly context?: ExecutableExpression | undefined; /** * Creates a new ExecutableCompletionExpression * * @param expression the expression this represents * @param isAccess whether this is an access completion (can index be used directly) * @param context evaluated and thrown as CompletionError, if undefined, the current scope is used */ constructor(expression: Expression, isAccess: boolean, context?: ExecutableExpression | undefined); evaluateInternal(context: InterpreterContext): never; /** * Transforms the given context into completion items * * @param value the context to transform * @param expression the expression where to complete * @returns the generated completion items */ private transformCompletionContext; /** * Gets the docs object from the given value * * @param value the value to get the docs from * @param context context requried for accessing fields * @returns the docs object or undefined if not found */ private getDocs; /** * Gets the docs string from the given value * * @param value the value to get the docs from * @param context context requried for accessing fields * @returns the docs string or undefined if not found */ private getDocsDescription; /** * Gets the snippet from the given value * * @param value the value to get the snippet from * @param context context requried for accessing fields * @returns the snippet or undefined if not found */ private getDocSnippet; /** * Gets the field description string for field from the docs * * @param value the value to get the field description from * @param context context requried for accessing fields * @param field the name of the field to get the description of * @returns the field description or undefined if not found */ private getFieldDescription; /** * Gets a field of the docs object as string * If the object is an object, the fields are listed * * @param docs the docs object * @param field the field to get * @param context context requried for accessing fields * @returns the field as string or undefined if not found */ private getDocField; /** * Creates a non-snippet completion item for an identifier * * @param key the identifier to insert * @param docs documentation of the identifier, only present if the identifier represents a function * @param range the range to replace * @param kind the kind of the completion item * @returns the completion item */ private createIdentifierCompletionItem; /** * Creates a completion item for a snippet * * @param key the identifier at the start of the snippet * @param docs documentation of the function of the identifier * @param snippet the snippet code to insert, without the identifier * @param range the range to replace * @returns the completion item */ private createSnippetCompletionItem; /** * Computes the filter text for a completion item * Currently simply prepends a dot to the key (necessary for field access as the dot is replaced) * * @param key the key of the completion item * @returns the filter text */ private computeFilterText; } //# sourceMappingURL=executableCompletionExpression.d.ts.map