use reflow to migrate from flow to typescript

This commit is contained in:
Sebastian Sdorra
2019-10-19 16:38:07 +02:00
parent f7b8050dfa
commit 6e7a08a3bb
495 changed files with 14239 additions and 13766 deletions

View File

@@ -1,8 +0,0 @@
// @flow
export type Person = {
name: string,
mail?: string
};
export const EXTENSION_POINT = "avatar.factory";

View File

@@ -0,0 +1,6 @@
export type Person = {
name: string;
mail?: string;
};
export const EXTENSION_POINT = 'avatar.factory';

View File

@@ -1,13 +1,11 @@
//@flow
import React from "react";
import {binder} from "@scm-manager/ui-extensions";
import {Image} from "..";
import type { Person } from "./Avatar";
import { EXTENSION_POINT } from "./Avatar";
import React from 'react';
import { binder } from '@scm-manager/ui-extensions';
import { Image } from '..';
import { Person } from './Avatar';
import { EXTENSION_POINT } from './Avatar';
type Props = {
person: Person
person: Person;
};
class AvatarImage extends React.Component<Props> {
@@ -19,11 +17,7 @@ class AvatarImage extends React.Component<Props> {
const avatar = avatarFactory(person);
return (
<Image
className="has-rounded-border"
src={avatar}
alt={person.name}
/>
<Image className="has-rounded-border" src={avatar} alt={person.name} />
);
}

View File

@@ -1,10 +1,9 @@
//@flow
import * as React from "react";
import {binder} from "@scm-manager/ui-extensions";
import { EXTENSION_POINT } from "./Avatar";
import * as React from 'react';
import { binder } from '@scm-manager/ui-extensions';
import { EXTENSION_POINT } from './Avatar';
type Props = {
children: React.Node
children: React.Node;
};
class AvatarWrapper extends React.Component<Props> {

View File

@@ -1,4 +0,0 @@
// @flow
export { default as AvatarWrapper } from "./AvatarWrapper";
export { default as AvatarImage } from "./AvatarImage";

View File

@@ -0,0 +1,2 @@
export { default as AvatarWrapper } from './AvatarWrapper';
export { default as AvatarImage } from './AvatarImage';