implement getMap, getArray, getXml, ..

This commit is contained in:
Kevin Jahns
2019-04-03 03:08:10 +02:00
parent 415de1cc4c
commit 92ca001cdc
23 changed files with 159 additions and 103 deletions

View File

@@ -13,18 +13,18 @@ import { isDeleted } from './DeleteSet.js'
*/
export class YEvent {
/**
* @param {AbstractType} target The changed type.
* @param {AbstractType<any> target The changed type.
* @param {Transaction} transaction
*/
constructor (target, transaction) {
/**
* The type on which this event was created on.
* @type {AbstractType}
* @type {AbstractType<any>
*/
this.target = target
/**
* The current target on which the observe callback is called.
* @type {AbstractType}
* @type {AbstractType<any>
*/
this.currentTarget = target
/**
@@ -81,7 +81,7 @@ export class YEvent {
* console.log(path) // might look like => [2, 'key1']
* child === type.get(path[0]).get(path[1])
*
* @param {AbstractType} parent
* @param {AbstractType<any> parent
* @param {AbstractItem} child target
* @return {Array<string|number>} Path to the target
*/