Hello,
I’m trying to use the queryeditorhelp but when i follow the tutorial i have this error :
Severity Code Description Project File Line Suppression State
Error TS2345 (TS) Argument of type '(props: QueryEditorHelpProps) => JSX.Element' is not assignable to parameter of type 'ComponentType<QueryEditorHelpProps<MyQuery>>'.
Type '(props: QueryEditorHelpProps) => JSX.Element' is not assignable to type 'FunctionComponent<QueryEditorHelpProps<MyQuery>>'.
Types of parameters 'props' and 'props' are incompatible.
Type 'QueryEditorHelpProps<MyQuery>' is not assignable to type 'QueryEditorHelpProps<DataQuery>'.
The types of 'datasource.components' are incompatible between these types.
Type 'DataSourcePluginComponents<DataSourceApi<MyQuery, DataSourceJsonData, {}>, MyQuery, DataSourceJsonData, {}> | undefined' is not assignable to type 'DataSourcePluginComponents<DataSourceApi<DataQuery, DataSourceJsonData, {}>, DataQuery, DataSourceJsonData, {}> | undefined'.
Type 'DataSourcePluginComponents<DataSourceApi<MyQuery, DataSourceJsonData, {}>, MyQuery, DataSourceJsonData, {}>' is not assignable to type 'DataSourcePluginComponents<DataSourceApi<DataQuery, DataSourceJsonData, {}>, DataQuery, DataSourceJsonData, {}>'.
Types of property 'QueryEditor' are incompatible.
Type 'ComponentType<QueryEditorProps<DataSourceApi<MyQuery, DataSourceJsonData, {}>, MyQuery, DataSourceJsonData, MyQuery>> | undefined' is not assignable to type 'ComponentType<QueryEditorProps<DataSourceApi<DataQuery, DataSourceJsonData, {}>, DataQuery, DataSourceJsonData, DataQuery>> | undefined'.
Type 'ComponentClass<QueryEditorProps<DataSourceApi<MyQuery, DataSourceJsonData, {}>, MyQuery, DataSourceJsonData, MyQuery>, any>' is not assignable to type 'ComponentType<QueryEditorProps<DataSourceApi<DataQuery, DataSourceJsonData, {}>, DataQuery, DataSourceJsonData, DataQuery>> | undefined'.
Type 'ComponentClass<QueryEditorProps<DataSourceApi<MyQuery, DataSourceJsonData, {}>, MyQuery, DataSourceJsonData, MyQuery>, any>' is not assignable to type 'ComponentClass<QueryEditorProps<DataSourceApi<DataQuery, DataSourceJsonData, {}>, DataQuery, DataSourceJsonData, DataQuery>, any>'.
Types of property 'propTypes' are incompatible.
Type 'WeakValidationMap<QueryEditorProps<DataSourceApi<MyQuery, DataSourceJsonData, {}>, MyQuery, DataSourceJsonData, MyQuery>> | undefined' is not assignable to type 'WeakValidationMap<QueryEditorProps<DataSourceApi<DataQuery, DataSourceJsonData, {}>, DataQuery, DataSourceJsonData, DataQuery>> | undefined'.
Type 'WeakValidationMap<QueryEditorProps<DataSourceApi<MyQuery, DataSourceJsonData, {}>, MyQuery, DataSourceJsonData, MyQuery>>' is not assignable to type 'WeakValidationMap<QueryEditorProps<DataSourceApi<DataQuery, DataSourceJsonData, {}>, DataQuery, DataSourceJsonData, DataQuery>>'.
Types of property 'onChange' are incompatible.
Type 'Validator<(value: MyQuery) => void> | undefined' is not assignable to type 'Validator<(value: DataQuery) => void> | undefined'.
Type 'Validator<(value: MyQuery) => void>' is not assignable to type 'Validator<(value: DataQuery) => void>'.
Type '(value: MyQuery) => void' is not assignable to type '(value: DataQuery) => void'. C:\Program Files\GrafanaLabs\grafana\data\plugins\testdb-testdb-datasource\tsconfig.json C:\Program Files\GrafanaLabs\grafana\data\plugins\testdb-testdb-datasource\src\module.ts 11 Active
Here is my code where i get the error :
.setQueryEditorHelp(QueryEditorHelp);
Nicolas