Skip to content

Commit 795766b

Browse files
committed
docs(store): clarify behavior of checkoutPair
1 parent 2d17ead commit 795766b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/sanity/src/core/store/_legacy/document/document-store.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@ function getIdPairFromPublished(publishedId: string): IdPair {
4949
* @hidden
5050
* @beta */
5151
export interface DocumentStore {
52-
/** @internal */
52+
/**
53+
* Checks out a document (with its published and draft version) for real-time editing.
54+
* Note that every call to this function will open a new listener to the server.
55+
* It's recommended to use the helper functions on `pair` below which will re-use a single connection.
56+
*
57+
* @internal
58+
**/
5359
checkoutPair: (idPair: IdPair) => Pair
5460
initialValue: (
5561
opts: InitialValueOptions,

0 commit comments

Comments
 (0)