# ModelTreeWalkerValue

interface

Object returned by [`ModelTreeWalker`](module_engine_model_treewalker-ModelTreeWalker.md) when traversing tree model.

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

<a id="properties">

## Properties

<a id="member-item">

### `item: ModelItem`

Item between old and new positions of [`ModelTreeWalker`](module_engine_model_treewalker-ModelTreeWalker.md).

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

<a id="member-length">

### `length?: number`

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

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

<a id="member-nextPosition">

### `nextPosition: ModelPosition`

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.

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

<a id="member-previousPosition">

### `previousPosition: ModelPosition`

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.

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

<a id="member-type">

### `type: ModelTreeWalkerValueType`

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

---

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