Experimental
Parse a ref from a URL string.
The URL's documentId must match the provided handle's documentId. Use findRef instead if you don't have the handle and need to look it up.
findRef
This API is experimental and may change in future versions.
The expected type of the value this ref points to (defaults to unknown)
The document handle to use (must match URL's documentId)
Full ref URL like "automerge:documentId/path#heads"
Error if URL's documentId doesn't match handle's documentId
const ref = refFromUrl<string>(handle, "automerge:abc/todos/0/title" as RefUrl);ref.value(); // string | undefined Copy
const ref = refFromUrl<string>(handle, "automerge:abc/todos/0/title" as RefUrl);ref.value(); // string | undefined
Parse a ref from a URL string.
The URL's documentId must match the provided handle's documentId. Use
findRefinstead if you don't have the handle and need to look it up.This API is experimental and may change in future versions.