Chore: Improve typings 🧹 (#74599)

* various type fixes

* candlestick panel type fixes

* few more fixes

* some fixes

* more :)

* moar!

* undo change to SilencesFilter

* undo change to configureStore
This commit is contained in:
Ashley Harrison
2023-09-13 09:17:07 +01:00
committed by GitHub
parent 5753024ad5
commit 0c44a6f9bb
62 changed files with 335 additions and 566 deletions

View File

@@ -27,15 +27,17 @@ export function queryIsEmpty(query: DataQuery): boolean {
}
export function addQuery(queries: DataQuery[], query?: Partial<DataQuery>, datasource?: DataSourceRef): DataQuery[] {
const q = query || {};
q.refId = getNextRefIdChar(queries);
q.hide = false;
const q: DataQuery = {
...query,
refId: getNextRefIdChar(queries),
hide: false,
};
if (!q.datasource && datasource) {
q.datasource = datasource;
}
return [...queries, q as DataQuery];
return [...queries, q];
}
export function isDataQuery(url: string): boolean {