ReadonlylookupResolve a $ref string to its target node, or undefined.
Optional ReadonlyextractExtract a $ref string from a node, or undefined when the node is
not a ref wrapper. The default reads node.$ref when node is an
object with a string $ref property.
Optional ReadonlyonCalled when a previously-visited $ref is encountered. Returns the
value the resolver should return in place of further resolution.
Optional ReadonlyonCalled when maxHops is exceeded. Returns the value the resolver
should return in place of further resolution.
Optional ReadonlymaxMaximum number of $ref hops permitted before onDepthExceeded fires.
Defaults to MAX_PATH_ITEM_REF_HOPS from core/limits.ts, the
canonical cap shared with the OpenAPI Path Item ref walker.
Optional ReadonlyvisitedPre-seeded visited-set. Useful when the caller has already followed one or more hops outside this helper.
Configuration for a single chain resolution.
lookup(ref)returns the dereferenced node for a given$refstring, orundefinedwhen the ref cannot be resolved. The chain follows further$refindirection on the returned node until either:onCycle(ref).maxHops→ callsonDepthExceeded(ref).lookupreturnsundefined→ returnsundefined.Callers decide whether
onCycle/onDepthExceededshould throw, emit a diagnostic, or return a fallback value.