Types: Adds type safety to appEvents (#19418)

* Types: Add type safety to appEvents
This commit is contained in:
kay delaney
2019-10-14 09:27:47 +01:00
committed by GitHub
parent e7c37cc316
commit 99411bf37a
138 changed files with 991 additions and 508 deletions

View File

@@ -5,7 +5,7 @@ import { connect } from 'react-redux';
import find from 'lodash/find';
// Types
import { UrlQueryMap } from '@grafana/runtime';
import { AppNotificationSeverity, StoreState } from 'app/types';
import { StoreState, AppNotificationSeverity, CoreEvents } from 'app/types';
import {
Alert,
AppPlugin,
@@ -173,7 +173,7 @@ class PluginPage extends PureComponent<Props, State> {
}
showUpdateInfo = () => {
appEvents.emit('show-modal', {
appEvents.emit(CoreEvents.showModal, {
src: 'public/app/features/plugins/partials/update_instructions.html',
model: this.state.plugin.meta,
});