Skip to content

API reference > @kontsedal/olas-devtools > setNodeState

setNodeState() function ​

Set state on the node at path. If the node doesn't exist (out-of-order event delivery), the tree is returned unchanged.

Signature:

typescript
export declare function setNodeState(root: ControllerNode, path: readonly string[], state: ControllerNode['state']): ControllerNode;

Parameters ​

Parameter

Type

Description

root

ControllerNode

path

readonly string[]

state

ControllerNode['state']

Returns:

ControllerNode

Released under the MIT License.