タグ

ブックマーク / flow.org (1)

  • Comment Types | Flow

    Flow supports a comment-based syntax, which makes it possible to use Flow without having to compile your files. 1/*::2type MyAlias = {3 foo: number,4 bar: boolean,5 baz: string,6};7*/8 9function method(value /*: MyAlias */) /*: boolean */ {10 return value.bar;11}12 13method({foo: 1, bar: true, baz: ["oops"]}); 13:33-13:40: Cannot call `method` with object literal bound to `value` because array lit

    Comment Types | Flow
    noonworks
    noonworks 2017/05/25
    こんなんあったんか!!!
  • 1