Chore: Type improvements 🧹 (#75271)

* fix some e2e flows types

* some type fixes

* must... fix... more...

* MOAR

* MOREMOREMORE

* 1 more
This commit is contained in:
Ashley Harrison
2023-09-22 15:06:49 +01:00
committed by GitHub
parent eba74f0408
commit ff0642bf6e
65 changed files with 217 additions and 387 deletions

View File

@@ -1072,7 +1072,7 @@ export class DashboardModel implements TimeModel {
}
getTimezone(): TimeZone {
return (this.timezone ? this.timezone : contextSrv?.user?.timezone) as TimeZone;
return this.timezone ? this.timezone : contextSrv?.user?.timezone;
}
private updateSchema(old: any) {
@@ -1141,7 +1141,7 @@ export class DashboardModel implements TimeModel {
// First try to find it in a collapsed row and exand it
const collapsedPanels = this.panels.filter((p) => p.collapsed);
for (const panel of collapsedPanels) {
const hasPanel = panel.panels?.some((rp: any) => rp.id === panelId);
const hasPanel = panel.panels?.some((rp) => rp.id === panelId);
hasPanel && this.toggleRow(panel);
}
@@ -1263,7 +1263,7 @@ export class DashboardModel implements TimeModel {
return !isEqual(updated, originalVariables);
}
private cloneVariablesFrom(variables: any[]): any[] {
private cloneVariablesFrom(variables: any[]) {
return variables.map((variable) => ({
name: variable.name,
type: variable.type,