fix minor typos

This commit is contained in:
synix 2024-04-25 11:17:49 +08:00
parent 25ae9f3236
commit f0dc53f53f
2 changed files with 5 additions and 5 deletions

View File

@ -225,7 +225,7 @@ const tryGcDeleteSet = (ds, store, gcFilter) => {
*/
const tryMergeDeleteSet = (ds, store) => {
// try to merge deleted / gc'd items
// merge from right to left for better efficiecy and so we don't miss any merge targets
// merge from right to left for better efficiency and so we don't miss any merge targets
ds.clients.forEach((deleteItems, client) => {
const structs = /** @type {Array<GC|Item>} */ (store.clients.get(client))
for (let di = deleteItems.length - 1; di >= 0; di--) {

View File

@ -154,7 +154,7 @@ export const readClientsStructRefs = (decoder, doc) => {
// @type {string|null}
const struct = new Item(
createID(client, clock),
null, // leftd
null, // left
(info & binary.BIT8) === binary.BIT8 ? decoder.readLeftID() : null, // origin
null, // right
(info & binary.BIT7) === binary.BIT7 ? decoder.readRightID() : null, // right origin
@ -178,7 +178,7 @@ export const readClientsStructRefs = (decoder, doc) => {
const struct = new Item(
createID(client, clock),
null, // leftd
null, // left
origin, // origin
null, // right
rightOrigin, // right origin
@ -370,7 +370,7 @@ export const writeStructsFromTransaction = (encoder, transaction) => writeClient
/**
* Read and apply a document update.
*
* This function has the same effect as `applyUpdate` but accepts an decoder.
* This function has the same effect as `applyUpdate` but accepts a decoder.
*
* @param {decoding.Decoder} decoder
* @param {Doc} ydoc
@ -451,7 +451,7 @@ export const readUpdateV2 = (decoder, ydoc, transactionOrigin, structDecoder = n
/**
* Read and apply a document update.
*
* This function has the same effect as `applyUpdate` but accepts an decoder.
* This function has the same effect as `applyUpdate` but accepts a decoder.
*
* @param {decoding.Decoder} decoder
* @param {Doc} ydoc