/
dimamir
/
yjs
Обзор
Документация
Войти
/
dimamir
/
yjs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/structs/AbstractStruct.js
51 строка
1 KB
Kevin Jahns
fix Y.Text formatting issue - closes #606
21 янв 2024, 13:27
21 янв 2024, 13:27
1cb52dc
Код
Авторство
О чём код?
import { UpdateEncoderV1, UpdateEncoderV2, ID, Transaction // eslint-disable-line } from '../internals.js' import * as error from 'lib0/error' export class AbstractStruct { /** * @param {ID} id * @param {number} length */ constructor (id, length) { this.id = id this.length = length } /** * @type {boolean} */ get deleted () { throw error.methodUnimplemented() } /** * Merge this struct with the item to the right. * This method is already assuming that `this.id.clock + this.length === this.id.clock`. * Also this method does *not* remove right from StructStore! * @param {AbstractStruct} right * @return {boolean} wether this merged with right */ mergeWith (right) { return false } /** * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder The encoder to write data to. * @param {number} offset * @param {number} encodingRef */ write (encoder, offset, encodingRef) { throw error.methodUnimplemented() } /** * @param {Transaction} transaction * @param {number} offset */ integrate (transaction, offset) { throw error.methodUnimplemented() } }