Upgrade to Flow 0.71
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// @flow
|
||||
import React, { Component } from 'react';
|
||||
import * as React from 'react';
|
||||
import { observable } from 'mobx';
|
||||
import { observer, inject } from 'mobx-react';
|
||||
import type { Location } from 'react-router-dom';
|
||||
@@ -30,9 +30,7 @@ type Props = {
|
||||
};
|
||||
|
||||
@observer
|
||||
class Collections extends Component {
|
||||
props: Props;
|
||||
|
||||
class Collections extends React.Component<Props> {
|
||||
render() {
|
||||
const { history, location, collections, ui, documents } = this.props;
|
||||
|
||||
@@ -73,7 +71,7 @@ type CollectionLinkProps = {
|
||||
};
|
||||
|
||||
@observer
|
||||
class CollectionLink extends Component {
|
||||
class CollectionLink extends React.Component<*> {
|
||||
props: CollectionLinkProps;
|
||||
|
||||
@observable menuOpen = false;
|
||||
@@ -168,7 +166,7 @@ const DocumentLink = observer(
|
||||
isActiveDocument)
|
||||
);
|
||||
|
||||
const handleMouseEnter = (event: SyntheticEvent) => {
|
||||
const handleMouseEnter = (event: SyntheticEvent<*>) => {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
prefetchDocument(document.id);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// @flow
|
||||
import React from 'react';
|
||||
import * as React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { color } from 'shared/styles/constants';
|
||||
import Flex from 'shared/components/Flex';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// @flow
|
||||
import React, { Component } from 'react';
|
||||
import * as React from 'react';
|
||||
import { observable, action } from 'mobx';
|
||||
import { observer } from 'mobx-react';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
@@ -47,19 +47,18 @@ const StyledDiv = StyledNavLink.withComponent('div');
|
||||
|
||||
type Props = {
|
||||
to?: string,
|
||||
onClick?: SyntheticEvent => *,
|
||||
children?: React$Element<*>,
|
||||
icon?: React$Element<*>,
|
||||
onClick?: (SyntheticEvent<*>) => *,
|
||||
children?: React.Node,
|
||||
icon?: React.Node,
|
||||
expand?: boolean,
|
||||
expandedContent?: React$Element<*>,
|
||||
expandedContent?: React.Node,
|
||||
hideExpandToggle?: boolean,
|
||||
iconColor?: string,
|
||||
active?: boolean,
|
||||
};
|
||||
|
||||
@observer
|
||||
class SidebarLink extends Component {
|
||||
props: Props;
|
||||
class SidebarLink extends React.Component<Props> {
|
||||
@observable expanded: boolean = false;
|
||||
|
||||
componentDidMount() {
|
||||
@@ -71,7 +70,7 @@ class SidebarLink extends Component {
|
||||
}
|
||||
|
||||
@action
|
||||
handleClick = (event: SyntheticEvent) => {
|
||||
handleClick = (event: SyntheticEvent<*>) => {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
this.expanded = !this.expanded;
|
||||
|
||||
Reference in New Issue
Block a user