migrate core plugins from flow to typescript

This commit is contained in:
Sebastian Sdorra
2019-10-21 12:13:08 +02:00
parent 85703161f6
commit 0703f1e2bd
104 changed files with 583 additions and 93542 deletions

View File

@@ -1,12 +1,12 @@
import React, { Component } from "react";
import { Route, Redirect, withRouter, RouteComponentProps } from "react-router-dom";
import { Route, Redirect, withRouter, RouteComponentProps, RouteProps } from "react-router-dom";
type Props = RouteComponentProps & {
authenticated?: boolean;
component: Component<any, any>;
};
type Props = RouteComponentProps &
RouteProps & {
authenticated?: boolean;
};
class ProtectedRoute extends React.Component<Props> {
class ProtectedRoute extends Component<Props> {
renderRoute = (Component: any, authenticated?: boolean) => {
return (routeProps: any) => {
if (authenticated) {

View File

@@ -11,8 +11,8 @@ type Props = {
autofocus?: boolean;
onChange: (value: string, name?: string) => void;
onReturnPressed?: () => void;
validationError: boolean;
errorMessage: string;
validationError?: boolean;
errorMessage?: string;
disabled?: boolean;
helpText?: string;
};