[Flow] The Fundamentals of Flow

Install:

yarn global add flow-typed /*get type defination*/
yarn add flow-bin -D

 

For example you have installed lodash libaray, and you want the defination file also, you can do:

flow-typed install

It will help to install the files automaticlly.

 

If you running flow with Node.js, the syatax:

const result: number = _.min([,1,2]);

cannot be understand by node.js.

 

You can do:

const result/* :number*/ = _.min([1,2])

or you can use Babel.

posted @ 2017-02-27 21:49  Zhentiw  阅读(177)  评论(0编辑  收藏  举报