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
Reorganize Management apps into Ingest, Data, Alerts and Insights, Security, Kibana, and Stack groups #65796
Reorganize Management apps into Ingest, Data, Alerts and Insights, Security, Kibana, and Stack groups #65796
Changes from 9 commits
465d813
a66a7e0
7cc3490
25cb6ac
f93aba0
a9fdf54
d3f557e
5c6d09e
6ceed19
3aa1d8f
b1771a1
b4b5b64
accc91e
9d97c23
af06fc5
29fa95e
3e38251
cde5d36
d14f15f
cd6fa5e
f1ddf84
1cf0af1
265373e
68c61fa
64cda1a
58b6e10
68c0eb4
dfccfa5
3554533
79bcbb7
69762fd
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.
Does anybody have any suggestions on what I could do to convince TypeScript that this function will always return a
ManagementSection
, and notundefined
? TS check shows this error everywhere this method is invoked: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.
We could consider throwing if
find
returnsundefined
. That would give us both transpile-time and runtime guaranteesThere 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.
See my previous comment. I consider this a flaw in the API. I think
throw
ing will work in the mean time.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.
Thanks Matt! I updated the code to throw.