The same OpenRPC Document that was passed in, but with all $ref's dereferenced.
[[OpenRPCDocumentDereferencingError]]
import { OpenRPC } from "@open-rpc/meta-schema"
import { dereferenceDocument } from "@open-rpc/schema-utils-js";
try {
const dereffedDocument = await dereferenceDocument({ ... }) as OpenRPC;
} catch (e) {
// handle validation errors
}
replaces $ref's within a document and its schemas. The replaced value will be a javascript object reference to the real schema / open-rpc component