Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
tree: Improve non-schema aware typing #22763
tree: Improve non-schema aware typing #22763
Changes from 19 commits
c6bff5f
be09116
0b3e0f2
2094876
54b9730
24c9042
56b1da9
11b9881
4e0913d
c768c55
8d4c75b
b66a64a
9525948
1d82b30
b51af25
10d0fbe
be3eb41
2ff6286
610b22e
a0f848d
3476f1c
2f5be79
db7dfea
6a1a891
68ea5d8
15257c6
a360253
89018a7
0160982
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This clause is a bit hard to parse, I think there might be a typo here, but I'm not sure what the intention was.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW I always just assumed this is how you were supposed to do it anyway. I don't think we made that explicitly clear anywhere but it makes sense, at least to me. The fact that either of the other two ways ever worked or still work feels like a hack to me. So, I don't feel that bad about this "breaking change", but I'm just one data point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had the same assumption, and draw the same conclusion as Noah.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that the above pattern is our actual recommendation, do we need to note this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was mostly intended to direct people away from relying on this despite it compiling. We don't want people doing what I did in the past and thing they are clever and getting a better devx by using the recursive helpers less since it might break again but differently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with removing it if you think that would be better. I partly just included it since it was interesting and should be discussed in this review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just rephrase it to say something like "Note: while the following pattern may still compile, we recommend using the previous pattern instead"?