forked from sombochea/verdaccio-ui
fix: @typescript-eslint/explicit-function-return-type
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* @ts-ignore */
|
||||
export default function fileSizeSI(a?: any, b?: any, c?: any, d?: any, e?: any) {
|
||||
export default function fileSizeSI(a?: any, b?: any, c?: any, d?: any, e?: any): string {
|
||||
return ((b = Math), (c = b.log), (d = 1e3), (e = (c(a) / c(d)) | 0), a / b.pow(d, e)).toFixed(2) + ' ' + (e ? 'kMGTPEZY'[--e] + 'B' : 'Bytes');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user