@metrichor/jmespath
Version:
Typescript implementation of the JMESPath spec (100% compliant)
15 lines (14 loc) • 669 B
TypeScript
import type { ExpressionNodeTree } from './Lexer';
import { Runtime } from './Runtime';
import type { JSONValue } from '.';
export declare class TreeInterpreter {
runtime: Runtime;
private _rootValue;
constructor();
search(node: ExpressionNodeTree, value: JSONValue): JSONValue;
visit(node: ExpressionNodeTree, value: JSONValue | ExpressionNodeTree): JSONValue | ExpressionNodeTree;
computeSliceParams(arrayLength: number, sliceParams: number[]): number[];
capSliceRange(arrayLength: number, actualValue: number, step: number): number;
}
export declare const TreeInterpreterInstance: TreeInterpreter;
export default TreeInterpreterInstance;