-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Update type check for TreeContainerProps
#10881
Update type check for TreeContainerProps
#10881
Conversation
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 confirmed with the changes that the outline-view
can successfully be constructed and viewed (the search
does not work, but it does without the changes to the outline-view
itself).
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.
The changes look good to me 👍
I confirmed that the new code works well, the outline-view works including the snippet, and so does searching in the trees.
// ***************************************************************************** | ||
import * as assert from 'assert'; |
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.
minor: add a newline after the header.
What it does
The previous implementation of the check to distinguish
TreeProps
fromTreeContainerProps
could be confused by the fact that both had asearch
key. This PR introduces special handling of that field to ensure that the check returns the correct value.How to test
createTreeContainer
withTreeProps
that include asearch
field. Observe that the tree view is successfully constructed and functions correctly.e.g. in
outline-view-frontend-module.ts
replace this:with this:
Review checklist
Reminder for reviewers