我有一个使用Flow进行静态类型检查的React项目;我有使用flow-typed安装npm第三方库的libdefs。但是,有时这些类型不被识别。例如,下面是使用react-router-dom NPM包使用类型时从相应的flow-typed/npm/react-router-dom_v4.x.x.js一个阵营部件,具有identifier ... Could not resolve name流错
我在我的测试文件中得到这些流程的错误: identifier `test`
Could not resolve name
identifier `expect`
Could not resolve name
我已经安装了流量类型的玩笑libdef,但它并没有任何区别。 更新:它看起来像由flow-typed创建的Jest libdef只是一个存根。我认为问题在于流式输入没有用于Jest
我使用的流量,而且大多的事情都是工作了,但我对微不足道,因为这东西抓在我的掉毛此错误: type Props = {
actions: object,
products: object,
};
type State = {
email: string,
name: string
};
class SomeComponent extends Com
流式类型的libdefs是否为react-router-native过期? 当flow荷兰国际集团这个工作代码,我得到: 3: import { Route, Switch, Redirect } from 'react-router-native';
^^^^^ Named import from module `react-router-native`. This module