Chore: noImplictAny no errors left (#18303)

* Add types and rewrite datasourceChanged to async/await
This commit is contained in:
Tobias Skarhed
2019-08-01 14:38:34 +02:00
committed by GitHub
parent bcf28cb7a2
commit 83da3660da
63 changed files with 285 additions and 211 deletions

View File

@@ -4,7 +4,7 @@ import { DashboardRow } from './DashboardRow';
import { PanelModel } from '../../state/PanelModel';
describe('DashboardRow', () => {
let wrapper, panel, dashboardMock;
let wrapper: any, panel: PanelModel, dashboardMock: any;
beforeEach(() => {
dashboardMock = {

View File

@@ -11,7 +11,7 @@ export interface DashboardRowProps {
}
export class DashboardRow extends React.Component<DashboardRowProps, any> {
constructor(props) {
constructor(props: DashboardRowProps) {
super(props);
this.state = {
@@ -32,7 +32,7 @@ export class DashboardRow extends React.Component<DashboardRowProps, any> {
onToggle = () => {
this.props.dashboard.toggleRow(this.props.panel);
this.setState(prevState => {
this.setState((prevState: any) => {
return { collapsed: !prevState.collapsed };
});
};