    import YEvent from 'yjs/src/Util/YEvent.js'

public class | source

# YEvent

#### Direct Subclass:

YArrayEvent, YMapEvent, src/Types/YXml/YXmlEvent.js~YXmlEvent

#### Indirect Subclass:

src/Types/YText/YText.js~YTextEvent

YEvent describes the changes on a YType.

## Constructor Summary

Public Constructor
public | constructor (target: YType) |

## Member Summary

Public Members
public | currentTarget : YType The current target on which the observe callback is called. |
public get | path : * Computes the path from `y` to the changed type. |
public | target : YType The type on which this event was created on. |

## Public Constructors

### public constructor(target: YType) source

#### Params:

Name | Type | Attribute | Description
target | YType |  | The changed type.

## Public Members

### public currentTarget: YType source

The current target on which the observe callback is called.

### public get path: * source

Computes the path from `y` to the changed type.

The following property holds:

#### Example:

      let type = y
      event.path.forEach(function (dir) {
        type = type.get(dir)
      })
      type === event.target // => true

### public target: YType source

The type on which this event was created on.