type fixes for breaking typescript@3.8.* release

This commit is contained in:
Kevin Jahns 2020-04-02 01:03:19 +02:00
parent 81650bc8f6
commit f40e09d156
22 changed files with 26 additions and 113 deletions

38
package-lock.json generated
View File

@ -98,9 +98,9 @@
} }
}, },
"acorn": { "acorn": {
"version": "7.1.0", "version": "7.1.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz",
"integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==",
"dev": true "dev": true
}, },
"acorn-jsx": { "acorn-jsx": {
@ -513,9 +513,9 @@
}, },
"dependencies": { "dependencies": {
"minimist": { "minimist": {
"version": "1.2.0", "version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true "dev": true
} }
} }
@ -1439,9 +1439,9 @@
} }
}, },
"lib0": { "lib0": {
"version": "0.2.15", "version": "0.2.22",
"resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.15.tgz", "resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.22.tgz",
"integrity": "sha512-wLwuTNNgtC7EQH0b3w4iqpts69TRFVur74Wta7jwgS2w+r/vPLuGcsBA16VoPgBYME7oxDSjEesJw9p/gHmFEg==", "integrity": "sha512-SFzX7/SGgrOK6VABQugczhAwaaZLW1VcrE9xG+cVG1+AMQWmcu/7SZaJq0KORnfHr1xK4P6JUBWfoxSCwBcgLA==",
"requires": { "requires": {
"isomorphic.js": "^0.1.3" "isomorphic.js": "^0.1.3"
} }
@ -2135,9 +2135,9 @@
"dev": true "dev": true
}, },
"minimist": { "minimist": {
"version": "1.2.0", "version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true "dev": true
}, },
"strip-json-comments": { "strip-json-comments": {
@ -2473,9 +2473,9 @@
}, },
"dependencies": { "dependencies": {
"minimist": { "minimist": {
"version": "1.2.0", "version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true "dev": true
} }
} }
@ -2783,12 +2783,12 @@
"dev": true "dev": true
}, },
"y-protocols": { "y-protocols": {
"version": "0.2.0", "version": "0.2.3",
"resolved": "https://registry.npmjs.org/y-protocols/-/y-protocols-0.2.0.tgz", "resolved": "https://registry.npmjs.org/y-protocols/-/y-protocols-0.2.3.tgz",
"integrity": "sha512-B9MCxMqLZCziLmQFlrXVN7MbIhXzF9bdwePcHzlVFIEHxnEvYIqAQYj4FHS376LBgfcjTUs7T614D+w0bpcJLA==", "integrity": "sha512-mJ838iW7XgMQqlv+9DtH7QyLqflZoy/VvaUWRIpwawee4mQiFJcEXazCmSYUHEbXIUuVNNc70FnuNSMWDC5vKQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"lib0": "^0.2.3" "lib0": "^0.2.20"
} }
} }
} }

View File

@ -56,7 +56,7 @@
}, },
"homepage": "https://yjs.dev", "homepage": "https://yjs.dev",
"dependencies": { "dependencies": {
"lib0": "^0.2.20" "lib0": "^0.2.22"
}, },
"devDependencies": { "devDependencies": {
"@rollup/plugin-commonjs": "^11.0.1", "@rollup/plugin-commonjs": "^11.0.1",
@ -70,6 +70,6 @@
"standard": "^14.0.0", "standard": "^14.0.0",
"tui-jsdoc-template": "^1.2.2", "tui-jsdoc-template": "^1.2.2",
"typescript": "^3.7.5", "typescript": "^3.7.5",
"y-protocols": "^0.2.0" "y-protocols": "^0.2.3"
} }
} }

View File

@ -6,9 +6,6 @@ import {
import * as encoding from 'lib0/encoding.js' // eslint-disable-line import * as encoding from 'lib0/encoding.js' // eslint-disable-line
import * as error from 'lib0/error.js' import * as error from 'lib0/error.js'
/**
* @private
*/
export class AbstractStruct { export class AbstractStruct {
/** /**
* @param {ID} id * @param {ID} id
@ -40,7 +37,6 @@ export class AbstractStruct {
* @param {encoding.Encoder} encoder The encoder to write data to. * @param {encoding.Encoder} encoder The encoder to write data to.
* @param {number} offset * @param {number} offset
* @param {number} encodingRef * @param {number} encodingRef
* @private
*/ */
write (encoder, offset, encodingRef) { write (encoder, offset, encodingRef) {
throw error.methodUnimplemented() throw error.methodUnimplemented()
@ -54,9 +50,6 @@ export class AbstractStruct {
} }
} }
/**
* @private
*/
export class AbstractStructRef { export class AbstractStructRef {
/** /**
* @param {ID} id * @param {ID} id

View File

@ -5,9 +5,6 @@ import {
import * as encoding from 'lib0/encoding.js' import * as encoding from 'lib0/encoding.js'
import * as decoding from 'lib0/decoding.js' import * as decoding from 'lib0/decoding.js'
/**
* @private
*/
export class ContentAny { export class ContentAny {
/** /**
* @param {Array<any>} arr * @param {Array<any>} arr
@ -101,8 +98,6 @@ export class ContentAny {
} }
/** /**
* @private
*
* @param {decoding.Decoder} decoder * @param {decoding.Decoder} decoder
* @return {ContentAny} * @return {ContentAny}
*/ */

View File

@ -7,9 +7,6 @@ import * as decoding from 'lib0/decoding.js'
import * as buffer from 'lib0/buffer.js' import * as buffer from 'lib0/buffer.js'
import * as error from 'lib0/error.js' import * as error from 'lib0/error.js'
/**
* @private
*/
export class ContentBinary { export class ContentBinary {
/** /**
* @param {Uint8Array} content * @param {Uint8Array} content
@ -92,8 +89,6 @@ export class ContentBinary {
} }
/** /**
* @private
*
* @param {decoding.Decoder} decoder * @param {decoding.Decoder} decoder
* @return {ContentBinary} * @return {ContentBinary}
*/ */

View File

@ -7,9 +7,6 @@ import {
import * as encoding from 'lib0/encoding.js' import * as encoding from 'lib0/encoding.js'
import * as decoding from 'lib0/decoding.js' import * as decoding from 'lib0/decoding.js'
/**
* @private
*/
export class ContentDeleted { export class ContentDeleted {
/** /**
* @param {number} len * @param {number} len

View File

@ -95,8 +95,6 @@ export class ContentFormat {
} }
/** /**
* @private
*
* @param {decoding.Decoder} decoder * @param {decoding.Decoder} decoder
* @return {ContentFormat} * @return {ContentFormat}
*/ */

View File

@ -304,7 +304,6 @@ export class Item extends AbstractStruct {
/** /**
* @param {Transaction} transaction * @param {Transaction} transaction
* @private
*/ */
integrate (transaction) { integrate (transaction) {
const store = transaction.doc.store const store = transaction.doc.store
@ -403,7 +402,6 @@ export class Item extends AbstractStruct {
/** /**
* Returns the next non-deleted item * Returns the next non-deleted item
* @private
*/ */
get next () { get next () {
let n = this.right let n = this.right
@ -415,7 +413,6 @@ export class Item extends AbstractStruct {
/** /**
* Returns the previous non-deleted item * Returns the previous non-deleted item
* @private
*/ */
get prev () { get prev () {
let n = this.left let n = this.left
@ -486,8 +483,6 @@ export class Item extends AbstractStruct {
/** /**
* @param {StructStore} store * @param {StructStore} store
* @param {boolean} parentGCd * @param {boolean} parentGCd
*
* @private
*/ */
gc (store, parentGCd) { gc (store, parentGCd) {
if (!this.deleted) { if (!this.deleted) {
@ -509,8 +504,6 @@ export class Item extends AbstractStruct {
* *
* @param {encoding.Encoder} encoder The encoder to write data to. * @param {encoding.Encoder} encoder The encoder to write data to.
* @param {number} offset * @param {number} offset
*
* @private
*/ */
write (encoder, offset) { write (encoder, offset) {
const origin = offset > 0 ? createID(this.id.client, this.id.clock + offset - 1) : this.origin const origin = offset > 0 ? createID(this.id.client, this.id.clock + offset - 1) : this.origin

View File

@ -22,7 +22,6 @@ import * as encoding from 'lib0/encoding.js' // eslint-disable-line
/** /**
* Call event listeners with an event. This will also add an event to all * Call event listeners with an event. This will also add an event to all
* parents (for `.observeDeep` handlers). * parents (for `.observeDeep` handlers).
* @private
* *
* @template EventType * @template EventType
* @param {AbstractType<EventType>} type * @param {AbstractType<EventType>} type
@ -54,17 +53,14 @@ export class AbstractType {
*/ */
this._item = null this._item = null
/** /**
* @private
* @type {Map<string,Item>} * @type {Map<string,Item>}
*/ */
this._map = new Map() this._map = new Map()
/** /**
* @private
* @type {Item|null} * @type {Item|null}
*/ */
this._start = null this._start = null
/** /**
* @private
* @type {Doc|null} * @type {Doc|null}
*/ */
this.doc = null this.doc = null
@ -90,7 +86,6 @@ export class AbstractType {
* *
* @param {Doc} y The Yjs instance * @param {Doc} y The Yjs instance
* @param {Item|null} item * @param {Item|null} item
* @private
*/ */
_integrate (y, item) { _integrate (y, item) {
this.doc = y this.doc = y
@ -99,7 +94,6 @@ export class AbstractType {
/** /**
* @return {AbstractType<EventType>} * @return {AbstractType<EventType>}
* @private
*/ */
_copy () { _copy () {
throw error.methodUnimplemented() throw error.methodUnimplemented()
@ -107,7 +101,6 @@ export class AbstractType {
/** /**
* @param {encoding.Encoder} encoder * @param {encoding.Encoder} encoder
* @private
*/ */
_write (encoder) { } _write (encoder) { }
@ -128,8 +121,6 @@ export class AbstractType {
* *
* @param {Transaction} transaction * @param {Transaction} transaction
* @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified. * @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified.
*
* @private
*/ */
_callObserver (transaction, parentSubs) { /* skip if no type is specified */ } _callObserver (transaction, parentSubs) { /* skip if no type is specified */ }

View File

@ -61,8 +61,6 @@ export class YArray extends AbstractType {
* *
* @param {Doc} y The Yjs instance * @param {Doc} y The Yjs instance
* @param {Item} item * @param {Item} item
*
* @private
*/ */
_integrate (y, item) { _integrate (y, item) {
super._integrate(y, item) super._integrate(y, item)
@ -83,8 +81,6 @@ export class YArray extends AbstractType {
* *
* @param {Transaction} transaction * @param {Transaction} transaction
* @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified. * @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified.
*
* @private
*/ */
_callObserver (transaction, parentSubs) { _callObserver (transaction, parentSubs) {
callTypeObservers(this, transaction, new YArrayEvent(this, transaction)) callTypeObservers(this, transaction, new YArrayEvent(this, transaction))
@ -200,7 +196,6 @@ export class YArray extends AbstractType {
/** /**
* @param {encoding.Encoder} encoder * @param {encoding.Encoder} encoder
* @private
*/ */
_write (encoder) { _write (encoder) {
encoding.writeVarUint(encoder, YArrayRefID) encoding.writeVarUint(encoder, YArrayRefID)

View File

@ -63,8 +63,6 @@ export class YMap extends AbstractType {
* *
* @param {Doc} y The Yjs instance * @param {Doc} y The Yjs instance
* @param {Item} item * @param {Item} item
*
* @private
*/ */
_integrate (y, item) { _integrate (y, item) {
super._integrate(y, item) super._integrate(y, item)
@ -83,8 +81,6 @@ export class YMap extends AbstractType {
* *
* @param {Transaction} transaction * @param {Transaction} transaction
* @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified. * @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified.
*
* @private
*/ */
_callObserver (transaction, parentSubs) { _callObserver (transaction, parentSubs) {
callTypeObservers(this, transaction, new YMapEvent(this, transaction, parentSubs)) callTypeObservers(this, transaction, new YMapEvent(this, transaction, parentSubs))
@ -215,8 +211,6 @@ export class YMap extends AbstractType {
/** /**
* @param {encoding.Encoder} encoder * @param {encoding.Encoder} encoder
*
* @private
*/ */
_write (encoder) { _write (encoder) {
encoding.writeVarUint(encoder, YMapRefID) encoding.writeVarUint(encoder, YMapRefID)

View File

@ -250,7 +250,7 @@ const insertText = (transaction, parent, left, right, currentAttributes, text, a
left = insertPos.left left = insertPos.left
right = insertPos.right right = insertPos.right
// insert content // insert content
const content = text.constructor === String ? new ContentString(text) : new ContentEmbed(text) const content = text.constructor === String ? new ContentString(/** @type {string} */ (text)) : new ContentEmbed(text)
left = new Item(nextID(transaction), left, left === null ? null : left.lastId, right, right === null ? null : right.id, parent, null, content) left = new Item(nextID(transaction), left, left === null ? null : left.lastId, right, right === null ? null : right.id, parent, null, content)
left.integrate(transaction) left.integrate(transaction)
return insertNegatedAttributes(transaction, parent, left, insertPos.right, insertPos.negatedAttributes) return insertNegatedAttributes(transaction, parent, left, insertPos.right, insertPos.negatedAttributes)
@ -400,7 +400,6 @@ export class YTextEvent extends YEvent {
constructor (ytext, transaction) { constructor (ytext, transaction) {
super(ytext, transaction) super(ytext, transaction)
/** /**
* @private
* @type {Array<DeltaItem>|null} * @type {Array<DeltaItem>|null}
*/ */
this._delta = null this._delta = null
@ -612,7 +611,6 @@ export class YText extends AbstractType {
/** /**
* Array of pending operations on this type * Array of pending operations on this type
* @type {Array<function():void>?} * @type {Array<function():void>?}
* @private
*/ */
this._pending = string !== undefined ? [() => this.insert(0, string)] : [] this._pending = string !== undefined ? [() => this.insert(0, string)] : []
} }
@ -629,8 +627,6 @@ export class YText extends AbstractType {
/** /**
* @param {Doc} y * @param {Doc} y
* @param {Item} item * @param {Item} item
*
* @private
*/ */
_integrate (y, item) { _integrate (y, item) {
super._integrate(y, item) super._integrate(y, item)
@ -651,8 +647,6 @@ export class YText extends AbstractType {
* *
* @param {Transaction} transaction * @param {Transaction} transaction
* @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified. * @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified.
*
* @private
*/ */
_callObserver (transaction, parentSubs) { _callObserver (transaction, parentSubs) {
callTypeObservers(this, transaction, new YTextEvent(this, transaction)) callTypeObservers(this, transaction, new YTextEvent(this, transaction))
@ -938,8 +932,6 @@ export class YText extends AbstractType {
/** /**
* @param {encoding.Encoder} encoder * @param {encoding.Encoder} encoder
*
* @private
*/ */
_write (encoder) { _write (encoder) {
encoding.writeVarUint(encoder, YTextRefID) encoding.writeVarUint(encoder, YTextRefID)

View File

@ -27,7 +27,6 @@ export class YXmlElement extends YXmlFragment {
this.nodeName = nodeName this.nodeName = nodeName
/** /**
* @type {Map<string, any>|null} * @type {Map<string, any>|null}
* @private
*/ */
this._prelimAttrs = new Map() this._prelimAttrs = new Map()
} }
@ -41,7 +40,6 @@ export class YXmlElement extends YXmlFragment {
* *
* @param {Doc} y The Yjs instance * @param {Doc} y The Yjs instance
* @param {Item} item * @param {Item} item
* @private
*/ */
_integrate (y, item) { _integrate (y, item) {
super._integrate(y, item) super._integrate(y, item)
@ -55,7 +53,6 @@ export class YXmlElement extends YXmlFragment {
* Creates an Item with the same effect as this Item (without position effect) * Creates an Item with the same effect as this Item (without position effect)
* *
* @return {YXmlElement} * @return {YXmlElement}
* @private
*/ */
_copy () { _copy () {
return new YXmlElement(this.nodeName) return new YXmlElement(this.nodeName)
@ -184,7 +181,6 @@ export class YXmlElement extends YXmlFragment {
* *
* This is called when this Item is sent to a remote peer. * This is called when this Item is sent to a remote peer.
* *
* @private
* @param {encoding.Encoder} encoder The encoder to write data to. * @param {encoding.Encoder} encoder The encoder to write data to.
*/ */
_write (encoder) { _write (encoder) {
@ -197,7 +193,6 @@ export class YXmlElement extends YXmlFragment {
* @param {decoding.Decoder} decoder * @param {decoding.Decoder} decoder
* @return {YXmlElement} * @return {YXmlElement}
* *
* @private
* @function * @function
*/ */
export const readYXmlElement = decoder => new YXmlElement(decoding.readVarString(decoder)) export const readYXmlElement = decoder => new YXmlElement(decoding.readVarString(decoder))

View File

@ -127,7 +127,6 @@ export class YXmlFragment extends AbstractType {
super() super()
/** /**
* @type {Array<any>|null} * @type {Array<any>|null}
* @private
*/ */
this._prelimContent = [] this._prelimContent = []
} }
@ -141,7 +140,6 @@ export class YXmlFragment extends AbstractType {
* *
* @param {Doc} y The Yjs instance * @param {Doc} y The Yjs instance
* @param {Item} item * @param {Item} item
* @private
*/ */
_integrate (y, item) { _integrate (y, item) {
super._integrate(y, item) super._integrate(y, item)
@ -224,7 +222,6 @@ export class YXmlFragment extends AbstractType {
/** /**
* Creates YXmlEvent and calls observers. * Creates YXmlEvent and calls observers.
* @private
* *
* @param {Transaction} transaction * @param {Transaction} transaction
* @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified. * @param {Set<null|string>} parentSubs Keys changed on this type. `null` if list was modified.
@ -328,7 +325,6 @@ export class YXmlFragment extends AbstractType {
* *
* This is called when this Item is sent to a remote peer. * This is called when this Item is sent to a remote peer.
* *
* @private
* @param {encoding.Encoder} encoder The encoder to write data to. * @param {encoding.Encoder} encoder The encoder to write data to.
*/ */
_write (encoder) { _write (encoder) {

View File

@ -25,8 +25,6 @@ export class YXmlHook extends YMap {
/** /**
* Creates an Item with the same effect as this Item (without position effect) * Creates an Item with the same effect as this Item (without position effect)
*
* @private
*/ */
_copy () { _copy () {
return new YXmlHook(this.hookName) return new YXmlHook(this.hookName)
@ -69,8 +67,6 @@ export class YXmlHook extends YMap {
* This is called when this Item is sent to a remote peer. * This is called when this Item is sent to a remote peer.
* *
* @param {encoding.Encoder} encoder The encoder to write data to. * @param {encoding.Encoder} encoder The encoder to write data to.
*
* @private
*/ */
_write (encoder) { _write (encoder) {
super._write(encoder) super._write(encoder)

View File

@ -79,8 +79,6 @@ export class YXmlText extends YText {
/** /**
* @param {encoding.Encoder} encoder * @param {encoding.Encoder} encoder
*
* @private
*/ */
_write (encoder) { _write (encoder) {
encoding.writeVarUint(encoder, YXmlTextRefID) encoding.writeVarUint(encoder, YXmlTextRefID)

View File

@ -42,7 +42,6 @@ export class DeleteSet {
constructor () { constructor () {
/** /**
* @type {Map<number,Array<DeleteItem>>} * @type {Map<number,Array<DeleteItem>>}
* @private
*/ */
this.clients = new Map() this.clients = new Map()
} }

View File

@ -39,12 +39,10 @@ export class Doc extends Observable {
this.store = new StructStore() this.store = new StructStore()
/** /**
* @type {Transaction | null} * @type {Transaction | null}
* @private
*/ */
this._transaction = null this._transaction = null
/** /**
* @type {Array<Transaction>} * @type {Array<Transaction>}
* @private
*/ */
this._transactionCleanups = [] this._transactionCleanups = []
} }
@ -105,6 +103,7 @@ export class Doc extends Observable {
t._map = type._map t._map = type._map
type._map.forEach(/** @param {Item?} n */ n => { type._map.forEach(/** @param {Item?} n */ n => {
for (; n !== null; n = n.left) { for (; n !== null; n = n.left) {
// @ts-ignore
n.parent = t n.parent = t
} }
}) })
@ -170,8 +169,6 @@ export class Doc extends Observable {
/** /**
* Emit `destroy` event and unregister all event handlers. * Emit `destroy` event and unregister all event handlers.
*
* @protected
*/ */
destroy () { destroy () {
this.emit('destroyed', [true]) this.emit('destroyed', [true])

View File

@ -28,13 +28,11 @@ export class Snapshot {
constructor (ds, sv) { constructor (ds, sv) {
/** /**
* @type {DeleteSet} * @type {DeleteSet}
* @private
*/ */
this.ds = ds this.ds = ds
/** /**
* State Map * State Map
* @type {Map<number,number>} * @type {Map<number,number>}
* @private
*/ */
this.sv = sv this.sv = sv
} }

View File

@ -13,7 +13,6 @@ export class StructStore {
constructor () { constructor () {
/** /**
* @type {Map<number,Array<GC|Item>>} * @type {Map<number,Array<GC|Item>>}
* @private
*/ */
this.clients = new Map() this.clients = new Map()
/** /**
@ -23,19 +22,16 @@ export class StructStore {
* slow in Chrome for arrays with more than 100k elements * slow in Chrome for arrays with more than 100k elements
* @see tryResumePendingStructRefs * @see tryResumePendingStructRefs
* @type {Map<number,{i:number,refs:Array<GCRef|ItemRef>}>} * @type {Map<number,{i:number,refs:Array<GCRef|ItemRef>}>}
* @private
*/ */
this.pendingClientsStructRefs = new Map() this.pendingClientsStructRefs = new Map()
/** /**
* Stack of pending structs waiting for struct dependencies * Stack of pending structs waiting for struct dependencies
* Maximum length of stack is structReaders.size * Maximum length of stack is structReaders.size
* @type {Array<GCRef|ItemRef>} * @type {Array<GCRef|ItemRef>}
* @private
*/ */
this.pendingStack = [] this.pendingStack = []
/** /**
* @type {Array<decoding.Decoder>} * @type {Array<decoding.Decoder>}
* @private
*/ */
this.pendingDeleteReaders = [] this.pendingDeleteReaders = []
} }

View File

@ -85,7 +85,6 @@ export class Transaction {
this.changedParentTypes = new Map() this.changedParentTypes = new Map()
/** /**
* @type {Set<ID>} * @type {Set<ID>}
* @private
*/ */
this._mergeStructs = new Set() this._mergeStructs = new Set()
/** /**

View File

@ -39,10 +39,7 @@
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
"baseUrl": "./", /* Base directory to resolve non-absolute module names. */ "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
"paths": { "paths": {
"yjs": ["./src/index.js"], "yjs": ["./src/index.js"]
"lib0/*": ["node_modules/lib0/*"],
"lib0/set.js": ["node_modules/lib0/set.js"],
"lib0/function.js": ["node_modules/lib0/function.js"]
}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ }, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */ // "typeRoots": [], /* List of folders to include type definitions from. */
@ -60,9 +57,8 @@
/* Experimental Options */ /* Experimental Options */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
"maxNodeModuleJsDepth": 5, // "maxNodeModuleJsDepth": 0,
// "types": ["./src/utils/typedefs.js"] // "types": ["./src/utils/typedefs.js"]
}, },
"include": ["./src/**/*.js", "./tests/**/*.js"], "include": ["./src/**/*.js", "./tests/**/*.js"]
"exclude": ["../lib0/**/*", "node_modules/**/*", "dist", "dist/**/*.js"]
} }