1
0
mirror of https://github.com/SomboChea/ui synced 2026-01-19 01:25:51 +07:00

fix: @typescript-eslint/explicit-function-return-type

This commit is contained in:
Griffithtp
2019-06-24 23:01:13 +01:00
parent 55f50e9f4d
commit 31c11f2b5b
9 changed files with 31 additions and 31 deletions

View File

@@ -1,11 +1,11 @@
import React from 'react';
import React, { ComponentClass } from 'react';
export function asyncComponent(getComponent) {
export function asyncComponent(getComponent): ComponentClass {
return class AsyncComponent extends React.Component {
public static Component = null;
public state = { Component: AsyncComponent.Component };
public componentDidMount() {
public componentDidMount(): void {
const { Component } = this.state;
if (!Component) {
getComponent()
@@ -20,7 +20,7 @@ export function asyncComponent(getComponent) {
}
}
public render() {
public render(): JSX.Element | null {
const { Component } = this.state;
if (Component) {
// eslint-disable-next-line verdaccio/jsx-spread