@types/jsonpath-plus
TypeScript icon, indicating that this package has built-in type declarations

5.0.5 • Public • Published

Installation

npm install --save @types/jsonpath-plus

Summary

This package contains type definitions for jsonpath-plus (https://github.com/s3u/JSONPath).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsonpath-plus.

index.d.ts

export as namespace JSONPath;

export type pathType = string | string[];
export type jsonType = null | boolean | number | string | object | [];
export type resultType =
    | "VALUE"
    | "Value"
    | "value"
    | "PATH"
    | "Path"
    | "path"
    | "POINTER"
    | "Pointer"
    | "pointer"
    | "PARENT"
    | "Parent"
    | "parent"
    | "PARENTPROPERTY"
    | "ParentProperty"
    | "parentProperty"
    | "parentproperty";
export type sandboxType = {
    [key in string]: string;
};
export type callback = (payloadValue: any, type: "value" | "property", fullPayload: any) => void;
export type otherCallback = (value: any, path: string, parent: object, parentPropertyName: any) => boolean;

export interface options {
    path?: pathType | undefined;
    json?: jsonType | undefined;
    autostart?: boolean | undefined;
    flatten?: boolean | undefined;
    resultType?: resultType | undefined;
    sandbox?: sandboxType | undefined;
    wrap?: boolean | undefined;
    preventEval?: boolean | undefined;
    parent?: object | undefined;
    parentProperty?: object | undefined;
    callback?: callback | undefined;
    otherTypeCallback?: otherCallback | undefined;
}

export function JSONPath(
    options?: options,
    path?: pathType,
    json?: jsonType,
    callback?: callback,
    otherTypeCallback?: otherCallback,
): object | object[];
export function JSONPath(
    path?: pathType,
    json?: jsonType,
    callback?: callback,
    otherTypeCallback?: otherCallback,
): object | object[];

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by Chris Barth.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/jsonpath-plus

Weekly Downloads

15,169

Version

5.0.5

License

MIT

Unpacked Size

5.58 kB

Total Files

5

Last publish

Collaborators

  • types