“流”在“流类型”库中发现错误

时间:2018-10-15 16:40:07

标签: reactjs

我正在使用流程0.83.0 in a create-react-app`项目以及其他依赖项:

...
"react": "^16.5.2",
"react-burger-menu": "^2.5.4",
"react-dom": "^16.5.2",
"react-inspector": "^2.3.0",
"react-leaflet": "^2.1.0",
"react-media": "^1.8.0",
"react-redux": "^5.0.3",
"react-router": "^4.3.1",
"react-router-dom": "^4.3.1",
"react-scripts": "2.0.4",
"redux": "^4.0.0",
"redux-devtools-extension": "^2.13.5",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.3.0",
...

我已经为所有相关库安装或创建了flow-typed存根。

当我运行flow时,我从内部依赖flow-typed的一个错误

yarn run v1.7.0
$ flow
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ flow-typed/npm/react-router_v4.x.x.js:120:36

Property activity is missing in object type [1] but exists in Props [2] in type argument CP.

     flow-typed/npm/react-router_v4.x.x.js
     117│   |}> {}
     118│
     119│   declare export function withRouter<P>(
 [1] 120│     Component: React$ComponentType<{| ...ContextRouter, ...P |}>
     121│   ): React$ComponentType<P>;
     122│
     123│   declare type MatchPathOptions = {

     flow-typed/npm/react-redux_v5.x.x.js
 [2] 141│     CP: $Diff<$Diff<ElementConfig<Com>, RSP>, RDP>,

以前使用流的先前版本(不确定,大约为0.75.x)对代码进行正确的类型检查

我应该注意什么:

  • 我对react-router的用法?
  • react,redux,react-redux,react-router等的版本...?
  • 流配置问题?

0 个答案:

没有答案