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

Why node.data can be null? #26

Open
busslina opened this issue Oct 11, 2023 · 1 comment
Open

Why node.data can be null? #26

busslina opened this issue Oct 11, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@busslina
Copy link

If I declare the tree data type as not null it should preserve this type. If I want to make it nullable I just can put <MyType?>.

@jawwad-hassan89
Copy link
Collaborator

Node uses the ValueListenable to store the data, and the valueListenable can return nullable data. This is the reason for nullable types.
Will look into if I can re-write the types to so that node can preserve the declared type.
Thanks for the suggestion.

@jawwad-hassan89 jawwad-hassan89 added the enhancement New feature or request label Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants