Automerge Repo - v2.5.2-alpha.5
    Preparing search index...

    Function findRef

    • Experimental

      Find a ref by its URL.

      URL format: automerge:{documentId}/{path}#{heads}

      This API is experimental and may change in future versions.

      Type Parameters

      • TValue = unknown

        The expected type of the value this ref points to (defaults to unknown)

      Parameters

      Returns Promise<Ref<TValue>>

      const ref = await findRef<string>(repo, "automerge:abc123/todos/0/title" as RefUrl);
      ref.value(); // string | undefined