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

Refactor expression types #480

Closed
andresmgot opened this issue Sep 27, 2022 · 0 comments · Fixed by #492
Closed

Refactor expression types #480

andresmgot opened this issue Sep 27, 2022 · 0 comments · Fixed by #492
Assignees

Comments

@andresmgot
Copy link
Contributor

andresmgot commented Sep 27, 2022

What happened:

The types defined in expressions.ts does not match reality. For example, where, reduce and groupBy elements of a ADX query, are marked as QueryEditorArrayExpression which is always an array of QueryEditorExpression, while the real type are QueryEditorOperatorExpression or QueryEditorReduceExpression or QueryEditorGroupByExpression, requiring some manual casting in some places.

The goal of this issue is to properly define these types so the casting (as) is not necessary.

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Screenshots

Anything else we need to know?:

Environment:

  • Grafana version:
  • Plugin version: 4.1.6
  • OS Grafana is installed on:
  • User OS & Browser:
  • Others:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants