forked from grafana/grafana
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtypes.ts
35 lines (29 loc) · 1003 Bytes
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { ParsedQuery } from 'query-string';
import { ReactNode } from 'react';
import { GrafanaThemeType } from '@grafana/data';
export type FailedToMountGrafanaErrorName = 'FailedToMountGrafana';
export interface GrafanaMicroFrontendState {
errors: Map<string | number, string | Error>;
}
export type GrafanaMicroFrontendActions = {
setErrors: (errors: GrafanaMicroFrontendState['errors']) => void;
};
/* eslint-disable-next-line */
export type AnyObject<K extends string | number | symbol = string, V = any> = {
[key in K]: V;
};
export interface FNDashboardProps {
name: string;
uid: string;
slug: string;
version: number;
mode: GrafanaThemeType.Dark | GrafanaThemeType.Light;
queryParams: ParsedQuery<string>;
fnError?: ReactNode;
pageTitle?: string;
controlsContainer: string | null;
isLoading: (isLoading: boolean) => void;
setErrors: (errors?: { [K: number | string]: string }) => void;
hiddenVariables: readonly string[];
container?: HTMLElement | null;
}