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) => JSONPathValue<T, P> } = ...

Type declaration