@jmespath-community/jmespath
Version:
Typescript implementation of the JMESPath Community specification
46 lines (45 loc) • 2.57 kB
TypeScript
import { ExpressionNode } from './AST.type';
import { JSONValue } from './JSON.type';
import { LexerOptions, LexerToken } from './Lexer.type';
import { Options } from './Parser.type';
import { InputArgument, RuntimeFunction, InputSignature } from './Runtime';
import { ScopeChain } from './Scope';
export type { Options } from './Parser.type';
export type { FunctionSignature, RuntimeFunction, InputSignature } from './Runtime';
export type { JSONValue, JSONPrimitive, JSONArray, JSONObject } from './JSON.type';
export declare const TYPE_ANY = InputArgument.TYPE_ANY;
export declare const TYPE_ARRAY = InputArgument.TYPE_ARRAY;
export declare const TYPE_ARRAY_ARRAY = InputArgument.TYPE_ARRAY_ARRAY;
export declare const TYPE_ARRAY_NUMBER = InputArgument.TYPE_ARRAY_NUMBER;
export declare const TYPE_ARRAY_OBJECT = InputArgument.TYPE_ARRAY_OBJECT;
export declare const TYPE_ARRAY_STRING = InputArgument.TYPE_ARRAY_STRING;
export declare const TYPE_BOOLEAN = InputArgument.TYPE_BOOLEAN;
export declare const TYPE_EXPREF = InputArgument.TYPE_EXPREF;
export declare const TYPE_NULL = InputArgument.TYPE_NULL;
export declare const TYPE_NUMBER = InputArgument.TYPE_NUMBER;
export declare const TYPE_OBJECT = InputArgument.TYPE_OBJECT;
export declare const TYPE_STRING = InputArgument.TYPE_STRING;
export declare function compile(expression: string, options?: Options): ExpressionNode;
export declare function tokenize(expression: string, options?: LexerOptions): LexerToken[];
export declare const registerFunction: (functionName: string, customFunction: RuntimeFunction<any[], JSONValue>, signature: InputSignature[]) => void;
export declare function search(data: JSONValue, expression: string, options?: Options): JSONValue;
export declare function Scope(): ScopeChain;
export declare const TreeInterpreter: import("./TreeInterpreter").TreeInterpreter;
export declare const jmespath: {
compile: typeof compile;
registerFunction: (functionName: string, customFunction: RuntimeFunction<any[], JSONValue>, signature: InputSignature[]) => void;
search: typeof search;
tokenize: typeof tokenize;
TreeInterpreter: import("./TreeInterpreter").TreeInterpreter;
TYPE_ANY: InputArgument;
TYPE_ARRAY_NUMBER: InputArgument;
TYPE_ARRAY_STRING: InputArgument;
TYPE_ARRAY: InputArgument;
TYPE_BOOLEAN: InputArgument;
TYPE_EXPREF: InputArgument;
TYPE_NULL: InputArgument;
TYPE_NUMBER: InputArgument;
TYPE_OBJECT: InputArgument;
TYPE_STRING: InputArgument;
};
export default jmespath;