# ViewTreeWalkerValue

interface

Object returned by [`ViewTreeWalker`](module_engine_view_treewalker-ViewTreeWalker.md) when traversing tree view.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-engine/src/view/treewalker.ts#L490)

<a id="properties">

## Properties

<a id="member-item">

### `item: ViewItem`

Item between the old and the new positions of the tree walker.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-engine/src/view/treewalker.ts#L500)

<a id="member-length">

### `length?: number`

Length of the item. For `'elementStart'` it is `1`. For `'text'` it is the length of that text. For `'elementEnd'` it is `undefined`.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-engine/src/view/treewalker.ts#L528)

<a id="member-nextPosition">

### `nextPosition: ViewPosition`

Next position of the iterator.

* Forward iteration: For `'elementStart'` it is the first position inside the element. For all other types it is the position after the item.
* Backward iteration: For `'elementEnd'` it is last position inside element. For all other types it is the position before the item.
* If the position is at the beginning or at the end of the [`ViewText`](module_engine_view_text-ViewText.md) it is always moved from the inside of the text to its parent just before or just after that text.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-engine/src/view/treewalker.ts#L522)

<a id="member-previousPosition">

### `previousPosition: ViewPosition`

Previous position of the iterator.

* Forward iteration: For `'elementEnd'` it is the last position inside the element. For all other types it is the position before the item.
* Backward iteration: For `'elementStart'` it is the first position inside the element. For all other types it is the position after item.
* If the position is at the beginning or at the end of the [`ViewText`](module_engine_view_text-ViewText.md) it is always moved from the inside of the text to its parent just before or just after that text.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-engine/src/view/treewalker.ts#L511)

<a id="member-type">

### `type: ViewTreeWalkerValueType`

Type of the step made by [`ViewTreeWalker`](module_engine_view_treewalker-ViewTreeWalker.md).

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-engine/src/view/treewalker.ts#L495)

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
