Remove or exempt all uses of 'any

* Refactored LocalForage
* Refactored SceneFilenameParser
This commit is contained in:
Infinite
2020-02-13 19:54:37 +01:00
parent a60c89ceb1
commit cdadb66d85
43 changed files with 671 additions and 677 deletions

View File

@@ -1,12 +1,25 @@
import React from "react";
export class ErrorBoundary extends React.Component<any, any> {
constructor(props: any) {
interface IErrorBoundaryProps {
children?: React.ReactNode,
}
type ErrorInfo = {
componentStack: string,
};
interface IErrorBoundaryState {
error?: Error;
errorInfo?: ErrorInfo;
}
export class ErrorBoundary extends React.Component<IErrorBoundaryProps, IErrorBoundaryState> {
constructor(props: IErrorBoundaryProps) {
super(props);
this.state = { error: null, errorInfo: null };
this.state = {};
}
public componentDidCatch(error: any, errorInfo: any) {
public componentDidCatch(error: Error, errorInfo: ErrorInfo) {
this.setState({
error,
errorInfo