(type, transaction, event)
| 579 | * @param {YEvent<any>} event |
| 580 | */ |
| 581 | export const callTypeObservers = (type, transaction, event) => { |
| 582 | const changedType = type |
| 583 | const changedParentTypes = transaction.changedParentTypes |
| 584 | while (true) { |
| 585 | // @ts-ignore |
| 586 | map.setIfUndefined(changedParentTypes, type, () => []).push(event) |
| 587 | if (type._item === null) { |
| 588 | break |
| 589 | } |
| 590 | type = /** @type {YType} */ (type._item.parent) |
| 591 | } |
| 592 | callEventHandlerListeners(/** @type {any} */ (changedType._eH), event, transaction) |
| 593 | } |
| 594 | |
| 595 | /** |
| 596 | * Abstract Yjs Type class |
no test coverage detected
searching dependent graphs…