diff --git a/src/structs/ContentType.js b/src/structs/ContentType.js index 30851077..ed83162c 100644 --- a/src/structs/ContentType.js +++ b/src/structs/ContentType.js @@ -39,7 +39,7 @@ export const YXmlTextRefID = 6 */ export class ContentType { /** - * @param {AbstractType} type + * @param {AbstractType} type */ constructor (type) { /** diff --git a/src/types/AbstractType.js b/src/types/AbstractType.js index 8a291af1..617ea19b 100644 --- a/src/types/AbstractType.js +++ b/src/types/AbstractType.js @@ -278,7 +278,7 @@ export class AbstractType { this._eH = createEventHandler() /** * Deep event handlers - * @type {EventHandler,Transaction>} + * @type {EventHandler>,Transaction>} */ this._dEH = createEventHandler() /** @@ -364,7 +364,7 @@ export class AbstractType { /** * Observe all events that are created by this type and its children. * - * @param {function(Array,Transaction):void} f Observer function + * @param {function(Array>,Transaction):void} f Observer function */ observeDeep (f) { addEventHandlerListener(this._dEH, f) @@ -382,7 +382,7 @@ export class AbstractType { /** * Unregister an observer function. * - * @param {function(Array,Transaction):void} f Observer function + * @param {function(Array>,Transaction):void} f Observer function */ unobserveDeep (f) { removeEventHandlerListener(this._dEH, f) diff --git a/src/types/YArray.js b/src/types/YArray.js index 63c07a6b..58c7287b 100644 --- a/src/types/YArray.js +++ b/src/types/YArray.js @@ -23,6 +23,7 @@ import { typeListSlice } from './AbstractType.js' /** * Event that describes the changes on a YArray * @template T + * @extends YEvent> */ export class YArrayEvent extends YEvent { /** diff --git a/src/types/YMap.js b/src/types/YMap.js index 612bde0c..a96004e6 100644 --- a/src/types/YMap.js +++ b/src/types/YMap.js @@ -21,6 +21,7 @@ import * as iterator from 'lib0/iterator' /** * @template T + * @extends YEvent> * Event that describes the changes on a YMap. */ export class YMapEvent extends YEvent { diff --git a/src/types/YText.js b/src/types/YText.js index 328795e0..518bfbc2 100644 --- a/src/types/YText.js +++ b/src/types/YText.js @@ -502,6 +502,7 @@ const deleteText = (transaction, currPos, length) => { */ /** + * @extends YEvent * Event that describes the changes on a YText type. */ export class YTextEvent extends YEvent { diff --git a/src/types/YXmlEvent.js b/src/types/YXmlEvent.js index 535e55d6..3c2566ed 100644 --- a/src/types/YXmlEvent.js +++ b/src/types/YXmlEvent.js @@ -5,6 +5,7 @@ import { } from '../internals.js' /** + * @extends YEvent * An Event that describes changes on a YXml Element or Yxml Fragment */ export class YXmlEvent extends YEvent { diff --git a/src/utils/Doc.js b/src/utils/Doc.js index 197801fa..ace76392 100644 --- a/src/utils/Doc.js +++ b/src/utils/Doc.js @@ -48,7 +48,7 @@ export class Doc extends Observable { this.guid = guid this.collectionid = collectionid /** - * @type {Map>} + * @type {Map>>} */ this.share = new Map() this.store = new StructStore() diff --git a/src/utils/Transaction.js b/src/utils/Transaction.js index a9ab6afa..a933056c 100644 --- a/src/utils/Transaction.js +++ b/src/utils/Transaction.js @@ -75,13 +75,13 @@ export class Transaction { * All types that were directly modified (property added or child * inserted/deleted). New types are not included in this Set. * Maps from type to parentSubs (`item.parentSub = null` for YArray) - * @type {Map,Set>} + * @type {Map>,Set>} */ this.changed = new Map() /** * Stores the events for the types that observe also child elements. * It is mainly used by `observeDeep`. - * @type {Map,Array>} + * @type {Map>,Array>>} */ this.changedParentTypes = new Map() /** @@ -148,7 +148,7 @@ export const nextID = transaction => { * did not change, it was just added and we should not fire events for `type`. * * @param {Transaction} transaction - * @param {AbstractType} type + * @param {AbstractType>} type * @param {string|null} parentSub */ export const addChangedTypeToTransaction = (transaction, type, parentSub) => { diff --git a/src/utils/YEvent.js b/src/utils/YEvent.js index 3501b587..5d33ef67 100644 --- a/src/utils/YEvent.js +++ b/src/utils/YEvent.js @@ -8,17 +8,18 @@ import * as set from 'lib0/set' import * as array from 'lib0/array' /** + * @template {AbstractType} T * YEvent describes the changes on a YType. */ export class YEvent { /** - * @param {AbstractType} target The changed type. + * @param {T} target The changed type. * @param {Transaction} transaction */ constructor (target, transaction) { /** * The type on which this event was created on. - * @type {AbstractType} + * @type {T} */ this.target = target /**