import type { CompletionItem } from 'vscode-languageserver-types'; /** * Keep only the SSJS of a mixed document. Everything else becomes spaces (line breaks stay), so * every offset and position of the result is one of the document. * @param text - full mixed document * @returns text of the same length holding only the bodies of server-side scripts */ export declare function ssjsProjection(text: string): string; /** * Tell whether an offset lies in the body of a server-side script. Both ends count, so a cursor * right before the closing tag is still inside. * @param text - full mixed document * @param offset - zero-based UTF-16 offset * @returns true if the offset is inside SSJS */ export declare function isInSsjsRegion(text: string, offset: number): boolean; /** * Input of {@link memberCompletions}. */ export interface MemberCompletionsInput { /** * What the TypeScript service offers at the cursor. */ typescriptItems: readonly CompletionItem[]; /** * Whether the cursor follows a member access, like `Platform.Function.` or `rows.`. */ isMemberAccess: boolean; /** * The catalogue's SSJS completions, whose labels carry their objects: `Platform.Function.Lookup`. */ catalogueItems: readonly CompletionItem[]; /** * Source text of the expression in front of the member's dot, like `Platform.Function`. * White space, comments and a leading `new` are ignored. */ receiver: string; /** * Whether `new` precedes the receiver in the document, as in `new Script.Util.`. Without it, * the catalogue's insert text of a constructor is not taken, as it would lack the `new`. A * receiver that itself starts with `new` counts as well. */ hasNew?: boolean; } /** * The completions after a member access in SSJS. TypeScript decides which members exist; the * catalogue describes those it knows. * * TypeScript's items are taken without its "unknown type" filler: for a receiver of type `any` it * lists the names used in the file, as items of kind `Text`. Each remaining member is looked up in * the catalogue as `.`. A match contributes `detail`, `documentation`, * `insertText` (cut down to the member), `insertTextFormat`, `tags` and `data`; the member keeps * its short label, which is what is shown and filtered by. The insert text of a constructor is * left out where the document has no `new` in front of the receiver. * @param input - TypeScript's items, the catalogue's items and the receiver * @returns the members, or null if TypeScript knows none and the caller should use its own path */ export declare function memberCompletions(input: MemberCompletionsInput): CompletionItem[] | null; //# sourceMappingURL=orchestration.d.ts.map