flow

2018-08-25  本文已影响96人  阿畅_

为什么用 flow

flow 的使用方式

类型判断

类型注释

数组

  /*@flow*/

  const arr: Array<number> = [1, 2, 3]
  arr.push('haha')

类和对象

  /*@flow*/

  const foo: ?string = null

上一篇 下一篇

猜你喜欢

热点阅读