Chore: Fixes some strict errors (#18381)

This commit is contained in:
Hugo Häggmark
2019-08-05 12:07:35 +02:00
committed by GitHub
parent 9a1975714d
commit c8b195147e
6 changed files with 10 additions and 8 deletions

View File

@ -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');

View File

@ -18,7 +18,7 @@ function getIconFromSeverity(severity: AppNotificationSeverity): string {
return 'fa fa-check';
}
default:
return null;
return '';
}
}

View File

@ -11,7 +11,7 @@ interface Props {
}
export class CopyToClipboard extends PureComponent<Props> {
clipboardjs: ClipboardJS;
clipboardjs?: ClipboardJS;
myRef: any;
constructor(props: Props) {

View File

@ -28,7 +28,9 @@ const EmptyListCTA: React.FunctionComponent<Props> = props => {
{proTipLinkTitle}
</a>
</span>
) : null;
) : (
''
);
const ctaElementClassName = !footer
? css`

View File

@ -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,

View File

@ -1,5 +1,5 @@
export interface AppNotification {
id?: number;
id: number;
severity: AppNotificationSeverity;
icon: string;
title: string;