Refactor: Make SelectOptionItem a generic type to enable select value typing (#16718)

* Make SelectOptionItem a generic type to enable select value typing
* TS ignores added because of optional value on Select items (it's no longer any)
This commit is contained in:
Dominik Prokop
2019-04-23 20:44:16 +02:00
committed by GitHub
parent f4a8240d0d
commit 19e824006a
26 changed files with 71 additions and 61 deletions

View File

@@ -8,7 +8,7 @@ import { SelectOptionItem } from '@grafana/ui';
export interface Props {
onChange: (perSeriesAligner) => void;
templateSrv: TemplateSrv;
alignOptions: SelectOptionItem[];
alignOptions: Array<SelectOptionItem<string>>;
perSeriesAligner: string;
}

View File

@@ -25,7 +25,7 @@ export interface Props {
}
interface State extends StackdriverQuery {
alignOptions: SelectOptionItem[];
alignOptions: Array<SelectOptionItem<string>>;
lastQuery: string;
lastQueryError: string;
[key: string]: any;