mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 10:02:33 +08:00
Chore: Fixes some strict errors (#18381)
This commit is contained in:
@ -46,7 +46,7 @@ extensionsIndex.keys().forEach((key: any) => {
|
||||
export class GrafanaApp {
|
||||
registerFunctions: any;
|
||||
ngModuleDependencies: any[];
|
||||
preBootModules: any[];
|
||||
preBootModules: any[] | null;
|
||||
|
||||
constructor() {
|
||||
addClassIfNoOverlayScrollbar('no-overlay-scrollbar');
|
||||
|
@ -18,7 +18,7 @@ function getIconFromSeverity(severity: AppNotificationSeverity): string {
|
||||
return 'fa fa-check';
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ interface Props {
|
||||
}
|
||||
|
||||
export class CopyToClipboard extends PureComponent<Props> {
|
||||
clipboardjs: ClipboardJS;
|
||||
clipboardjs?: ClipboardJS;
|
||||
myRef: any;
|
||||
|
||||
constructor(props: Props) {
|
||||
|
@ -28,7 +28,9 @@ const EmptyListCTA: React.FunctionComponent<Props> = props => {
|
||||
{proTipLinkTitle}
|
||||
</a>
|
||||
</span>
|
||||
) : null;
|
||||
) : (
|
||||
''
|
||||
);
|
||||
|
||||
const ctaElementClassName = !footer
|
||||
? css`
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { AppNotification, AppNotificationSeverity, AppNotificationTimeout } from 'app/types';
|
||||
import { getMessageFromError } from 'app/core/utils/errors';
|
||||
|
||||
const defaultSuccessNotification: AppNotification = {
|
||||
const defaultSuccessNotification = {
|
||||
title: '',
|
||||
text: '',
|
||||
severity: AppNotificationSeverity.Success,
|
||||
@ -9,7 +9,7 @@ const defaultSuccessNotification: AppNotification = {
|
||||
timeout: AppNotificationTimeout.Success,
|
||||
};
|
||||
|
||||
const defaultWarningNotification: AppNotification = {
|
||||
const defaultWarningNotification = {
|
||||
title: '',
|
||||
text: '',
|
||||
severity: AppNotificationSeverity.Warning,
|
||||
@ -17,7 +17,7 @@ const defaultWarningNotification: AppNotification = {
|
||||
timeout: AppNotificationTimeout.Warning,
|
||||
};
|
||||
|
||||
const defaultErrorNotification: AppNotification = {
|
||||
const defaultErrorNotification = {
|
||||
title: '',
|
||||
text: '',
|
||||
severity: AppNotificationSeverity.Error,
|
||||
|
@ -1,5 +1,5 @@
|
||||
export interface AppNotification {
|
||||
id?: number;
|
||||
id: number;
|
||||
severity: AppNotificationSeverity;
|
||||
icon: string;
|
||||
title: string;
|
||||
|
Reference in New Issue
Block a user