UNPKG

@apiture/api-ref-resolver

Version:

Tool to merge multiple OpenAPI or AsyncAPI documents that use JSON Reference links (`$ref`) to reference API definition elements across source files.

21 lines (20 loc) 823 B
import type { Node } from './RefVisitor'; export declare type JsonNode = Node; export declare type JsonKey = string | number; export declare type JsonItem = object | [] | string | boolean | number | null; export declare class JsonNavigation { private document; private keys; constructor(document: JsonNode, ...keys: JsonKey[]); path(): JsonKey[]; itemAtFragment(fragment: string): JsonItem | undefined; static itemAtFragment(document: JsonNode, fragment: string): JsonItem | undefined; asFragment(): string; static asFragment(keys: JsonKey[], withHash?: boolean): string; static asKeys(fragment: string): JsonKey[]; isAtComponent(): boolean; itemAtPointer(keys: JsonKey[]): JsonItem; currentKey(): JsonKey; lastItem(): JsonItem; with(key: JsonKey): JsonNavigation; }