import { J as JsonValue } from './types-Dzi0PpYX.js'; /** * Resolve an RFC 6901 JSON Pointer fragment (the part AFTER a leading * `#`) against a root document. Percent-encoded octets are decoded * before `~0`/`~1` per RFC 6901 ยง5. * * Behavior: * - `""` or `"/"` returns the root (the whole-document pointer). * - Any other pointer MUST start with `/`. * - Stray `%` characters that aren't a valid `%XX` escape are * preserved rather than decoded. * - Numeric pointer segments traverse arrays by index. * - Missing targets and pointers that walk into a primitive throw * `Error`; use a `try`/`catch` at call sites that expect the * reference to optionally exist. * * Shared by `@oav/schema`'s internal `$ref` resolver and `@oav/spec`'s * document stitcher; having one implementation means a single place * for any future RFC edge-case fix. * * @public */ declare function resolveJsonPointer(root: unknown, pointer: string): JsonValue; export { resolveJsonPointer as r };