@scalar/api-client
Version:
the open source API testing client
14 lines • 737 B
TypeScript
import * as monaco from 'monaco-editor';
import type { JsonPath } from './json-ast.js';
/**
* Retrieves a JSON AST node from a Monaco editor model at the specified JSON path.
*
* Utilizes Monaco's JSON worker to parse the document and returns the AST node
* located at the given path, or null if not found.
*
* @param model - The Monaco editor text model representing the JSON document.
* @param path - The JSON path to locate the AST node.
* @returns A promise resolving to the AST node at the path, or null if not found.
*/
export declare const getJsonAstNodeFromPath: (model: monaco.editor.ITextModel, path: JsonPath) => Promise<monaco.languages.json.ASTNode | null>;
//# sourceMappingURL=get-json-ast-node-from-path.d.ts.map