Skip to main content

@skyleague/jsonpath

Index

Type Aliases

Variables

Type Aliases

JSONPathValue

JSONPathValue<T, P>: P extends `${infer Start}.${infer Rest}` ? Start extends Root ? PathValueAccessor<T, Rest> : never : P extends Root ? T : never

Type parameters

  • T
  • P: string

Root

Root: $

Variables

constJSONPath

JSONPath: { get: <T, P>(json: T, path: P, options?: Omit<JSONPathOptions, json | path>) => JSONPathValue<T, P> } = ...

Type declaration

  • get: <T, P>(json: T, path: P, options?: Omit<JSONPathOptions, json | path>) => JSONPathValue<T, P>
      • <T, P>(json: T, path: P, options?: Omit<JSONPathOptions, json | path>): JSONPathValue<T, P>
      • Type parameters

        • T
        • P: string

        Parameters

        • json: T
        • path: P
        • options: Omit<JSONPathOptions, json | path> = {}

        Returns JSONPathValue<T, P>