Documentation / @expofp/resolve
@expofp/resolve
Interfaces
| Interface | Description |
|---|---|
| Ref | - |
| ResolveOptions | - |
Type Aliases
| Type Alias | Description |
|---|---|
| RefTarget | - |
Functions
| Function | Description |
|---|---|
| clearResolveCache | Drop every cached fetch and settled value (tests; long-lived kiosk refreshes). |
| getResolved | The settled value of an already-resolved $ref, synchronously. Throws when the ref has not settled (never resolved, still in flight, or failed) — a boot-ordering mistake that should surface loudly. Non-ref values pass through. Probe with isResolved where absence is expected. |
| isResolved | Whether getResolved would succeed. Non-ref values are always "resolved". |
| resolve | Resolve a $ref to its document. Non-ref values pass through (they ARE the value). A ref carrying a process hook has it applied to the raw document — that is the whole extension surface; this package knows nothing about schemas or assets. The result is deep-frozen and memoized by $ref for the sync getResolved; repeated resolves of the same ref reuse the fetch cache, so they cost no extra network round-trip. The memo is keyed by URL alone — resolving the same URL through refs with different process hooks settles whichever ran last. |