Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed TypeScript definition for updateNode #72

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Alexlg89
Copy link

@Alexlg89 Alexlg89 commented Feb 10, 2020

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 ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant