Chore: Reduces strict errors (#33012)

* Chore: reduces strict error in OptionPicker tests

* Chore: reduces strict errors in FormDropdownCtrl

* Chore: reduces has no initializer and is not definitely assigned in the constructor errors

* Chore: reduces has no initializer and is not definitely assigned in the constructor errors

* Chore: lowers strict count limit

* Tests: updates snapshots

* Tests: updates snapshots

* Chore: updates after PR comments

* Refactor: removes throw and changes signature for DashboardSrv.getCurrent
This commit is contained in:
Hugo Häggmark
2021-04-15 14:21:06 +02:00
committed by GitHub
parent 345d9f93fe
commit 34b4f7c717
42 changed files with 286 additions and 131 deletions

View File

@@ -135,9 +135,9 @@ export class PanelModel implements DataConfigSource {
collapsed?: boolean;
panels?: any;
targets: DataQuery[];
declare targets: DataQuery[];
transformations?: DataTransformerConfig[];
datasource: string | null;
datasource: string | null = null;
thresholds?: any;
pluginVersion?: string;
@@ -145,29 +145,29 @@ export class PanelModel implements DataConfigSource {
timeFrom?: any;
timeShift?: any;
hideTimeOverride?: any;
options: {
declare options: {
[key: string]: any;
};
fieldConfig: FieldConfigSource;
declare fieldConfig: FieldConfigSource;
maxDataPoints?: number | null;
interval?: string | null;
description?: string;
links?: DataLink[];
transparent: boolean;
declare transparent: boolean;
libraryPanel?: { uid: undefined; name: string } | PanelModelLibraryPanel;
// non persisted
isViewing: boolean;
isEditing: boolean;
isInView: boolean;
hasChanged: boolean;
isViewing = false;
isEditing = false;
isInView = false;
hasChanged = false;
hasRefreshed: boolean;
hasRefreshed?: boolean;
events: EventBus;
cacheTimeout?: any;
cachedPluginOptions: Record<string, PanelOptionsCache>;
declare cachedPluginOptions: Record<string, PanelOptionsCache>;
legend?: { show: boolean; sort?: string; sortDesc?: boolean };
plugin?: PanelPlugin;