AbstractType()

new AbstractType()

Classes

AbstractType

Members

_dEH :EventHandler.<Array.<YEvent>, Transaction>

Deep event handlers

_eH :EventHandler.<EventType, Transaction>

Event handlers

_first

The first non-deleted item

_item :Item|null

_map :Map.<string, Item>

_searchMarker :null|Array.<ArraySearchMarker>

_start :Item|null

doc :Doc|null

Methods

_callObserver(transaction, parentSubs)

Creates YEvent and calls all type observers. Must be implemented by each type.

Parameters:
Name Type Description
transaction Transaction
parentSubs Set.<(null|string)>

Keys changed on this type. null if list was modified.

_copy() → {AbstractType.<EventType>}

Returns:
AbstractType.<EventType>

_integrate(y, item)

Integrate this type into the Yjs instance.

  • Save this struct in the os
  • This type is sent to other client
  • Observer functions are fired
Parameters:
Name Type Description
y Doc

The Yjs instance

item Item | null

_write(encoder)

Parameters:
Name Type Description
encoder AbstractUpdateEncoder

clone() → {AbstractType.<EventType>}

Returns:
AbstractType.<EventType>

observe(f)

Observe all events that are created on this type.

Parameters:
Name Type Description
f function

Observer function

observeDeep(f)

Observe all events that are created by this type and its children.

Parameters:
Name Type Description
f function

Observer function

abstract toJSON() → {any}

Returns:
any

unobserve(f)

Unregister an observer function.

Parameters:
Name Type Description
f function

Observer function

unobserveDeep(f)

Unregister an observer function.

Parameters:
Name Type Description
f function

Observer function