Constructor Summary
Public Constructor | ||
public |
|
Method Summary
Public Methods | ||
public |
Compute the path from this type to the specified target. |
|
public |
Observe all events that are created on this type. |
|
public |
observeDeep(f: Function) Observe all events that are created by this type and its children. |
|
public |
Unregister an observer function. |
|
public |
Unregister an observer function. |
Public Constructors
Public Methods
public getPathTo(type: YType): Array<string> source
Compute the path from this type to the specified target.
Params:
Name | Type | Attribute | Description |
type | YType | Type target |
Example:
It should be accessible via `this.get(result[0]).get(result[1])..`
const path = type.getPathTo(child)
// assuming `type instanceof YArray`
console.log(path) // might look like => [2, 'key1']
child === type.get(path[0]).get(path[1])
public observe(f: Function) source
Observe all events that are created on this type.
Params:
Name | Type | Attribute | Description |
f | Function | Observer function |
public observeDeep(f: Function) source
Observe all events that are created by this type and its children.
Params:
Name | Type | Attribute | Description |
f | Function | Observer function |