I couldn't get the updateNode function to work in my project. We are using TypeScript.
The TypeScript definition for the updateNode Function was incorrect.
The first parameter in the definition is a ISlTreeNode, but the code uses the path (number[]).
I changed the parameter from
nodeToUpdate: ISlTreeNode<TDataType>
to
path: number[]
Best regards,
Alex
Edit:
Alongside using this package, i noticed that the definition for the methods insert and remove also where missing in the TypeScript definition. I added them, too ;)
I couldn't get the updateNode function to work in my project. We are using TypeScript. The TypeScript definition for the updateNode Function was incorrect. The first parameter in the definition is a ISlTreeNode, but the code uses the path (number[]).
I changed the parameter from
nodeToUpdate: ISlTreeNode<TDataType>
to
path: number[]
Best regards, Alex
Edit: Alongside using this package, i noticed that the definition for the methods insert and remove also where missing in the TypeScript definition. I added them, too ;)