Skip to content

Commit

Permalink
docs(js): add return type annotations
Browse files Browse the repository at this point in the history
Signed-off-by: Max <max@nextcloud.com>
  • Loading branch information
max-nextcloud authored and backportbot-nextcloud[bot] committed Jan 19, 2024
1 parent 283434b commit 83816af
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/helpers/yjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { Doc, encodeStateAsUpdate, applyUpdate } from 'yjs'
*
* Used to store yjs state on the server.
* @param {Y.Doc} ydoc - encode state of this doc
* @return {string}
*/
export function getDocumentState(ydoc) {
const update = Y.encodeStateAsUpdate(ydoc)
Expand All @@ -50,6 +51,7 @@ export function applyDocumentState(ydoc, documentState, origin) {
*
* @param {Y.Doc} ydoc - encode state of this doc
* @param {string} encodedBaseUpdate - base64 encoded doc update to build upon
* @return {string|undefined}
*/
export function getUpdateMessage(ydoc, encodedBaseUpdate) {
const baseUpdate = decodeArrayBuffer(encodedBaseUpdate)
Expand Down

0 comments on commit 83816af

Please sign in to comment.