
链接:
https://github.com/facebook/react-native/blob/master/Examples/2048/GameBoard.js
代码第35行
var Tile = function (value?: number, row?: number, column?: number) {
};
value?: number, row?: number, column?: number这个是个什么语法?
1 zythum 2015-06-04 17:28:14 +08:00 用 babel 转换为 var Tile = function Tile(value, row, column) {}; 所以估计是某个es7的冷门规范。估计是规定类型什么(类似typescript),但是具体规范在哪没找到.... |
2 leofml 2015-06-04 18:49:42 +08:00 facebook 出的 http://flowtype.org/ Flow is a static type checker, designed to find type errors in Javascript programs |
3 amphineko 2015-06-05 18:22:19 +08:00 via iPhone condition ? value-true : value-false 就是 ? 运算符吧 |