import { INode } from '@mcschema/core'; import { ASTNode, Hover } from 'vscode-json-languageservice'; import { CodeAction, Diagnostic } from 'vscode-languageserver/node'; import { ParserSuggestion, ParsingContext, ValidateResult } from '../types'; export declare class JsonSchemaHelper { private static readonly Replacers; private static readonly ValidateHook; static validate(ans: ValidateResult, node: ASTNode | undefined, schema: INode, ctx: ParsingContext): void; static suggest(ans: ParserSuggestion[], node: ASTNode | undefined, schema: INode, ctx: ParsingContext): void; static onHover(node: ASTNode | undefined, schema: INode, ctx: ParsingContext, offset: number): Hover | null; private static readonly CodeActionHook; static onCodeAction(node: ASTNode | undefined, schema: INode, ctx: ParsingContext, range: [number, number], diagnostics: Diagnostic[]): CodeAction[] | null; private static setUp; private static suggestFromSchema; private static suggestFromStringValidator; private static getDefaultValueSnippet; /** * Replaces some values that require snippet insert positions with some magic strings. */ private static jsonSnippetReplacer; /** * Resolve the magic strings provided from `jsonSnippetReplacer` function with the actual TextMate syntax. */ private static resolveJsonSnippetMagicStrings; /** * @param cb A callback that is called on every node. */ private static walkAstNode; private static legacyValidateFromStringValidator; private static executeStringValidator; private static escapeCompletion; private static combineResult; private static convertSchemaError; /** * @param path Will be changed with the remaining elements after navigation. */ private static navigateNodes; /** * This function won't work if the path contains any `pop` after `push`, which should be fine. * @param path Won't be changed. */ private static navigateRelativePath; private static getSelectedNode; private static restoreValueFromNode; private static getNodeRange; private static pathPopAll; }