mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Improve some types (#64675)
* some type fixes * few more * more type fixes * fix the majority of (window as any) calls * don't make new variable for event * few more * MOAR
This commit is contained in:
@@ -10,7 +10,7 @@ type WithGrafanaRuntime<T> = T & {
|
||||
};
|
||||
|
||||
const hasGrafanaRuntime = <T>(obj: T): obj is WithGrafanaRuntime<T> => {
|
||||
return typeof (obj as any)?.grafanaRuntime === 'object';
|
||||
return 'grafanaRuntime' in obj;
|
||||
};
|
||||
|
||||
e2e.benchmark({
|
||||
|
||||
@@ -88,14 +88,14 @@ e2e.scenario({
|
||||
},
|
||||
});
|
||||
|
||||
const expectInspectorResultAndClose = (expectCallBack: (keys: any[]) => void) => {
|
||||
const expectInspectorResultAndClose = (expectCallBack: (keys: JQuery<HTMLElement>) => void) => {
|
||||
e2e.components.QueryTab.queryInspectorButton().should('be.visible').click();
|
||||
|
||||
e2e.components.PanelInspector.Query.refreshButton().should('be.visible').click();
|
||||
|
||||
e2e.components.PanelInspector.Query.jsonObjectKeys({ timeout: flakyTimeout })
|
||||
.should('be.visible')
|
||||
.within((keys: any) => expectCallBack(keys));
|
||||
.within((keys) => expectCallBack(keys));
|
||||
|
||||
e2e.components.Drawer.General.close().should('be.visible').click();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user