-
Notifications
You must be signed in to change notification settings - Fork 11.6k
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
Alerting: Improve query types usage to prevent ts-errors #65238
Conversation
You have successfully added a new CodeQL configuration |
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.
LGTM! Maybe we could do it differently so we avoid adding a parameter to onChangeQuery
?
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 makes more sense to me 👍
On a side note I think we should probably have stricter typing than the generic AlertQuery
(and it looks like mapToQuery
doesn't event return a specific type, but just DataQuery & { expr: string }
:(
615dce0
to
950c3aa
Compare
950c3aa
to
c9909ff
Compare
I changed the approach by using a new helper function |
00446de
to
acb0ae3
Compare
What is this feature?
Removes the usage of
ts-ignore
when accessing theexpr
property for recording rules queries after #63260. Instead of that, proper types are assigned where needed.Why do we need this feature?
To improve code quality.