facebook / facebook/flow

Document @flow pragmas better

未關閉
#1,382 7 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
Needs docs
主要語言
Rust
星號
22.3k
分支
1.9k
PR 合併指標
30 天內沒有已合併 PR

描述

The docs about the `@flow` pragma are kind of hard to find without reading lots of prose. It's mentioned in http://flowtype.org/docs/five-simple-examples.html, http://flowtype.org/docs/new-project.html and http://flowtype.org/docs/existing.html, but I think it probably deserves its own section.

The last page also mentions `@flow weak` which I'm not sure still works as described.

Nothing mentions `@noflow` yet. This mode should be thought of as something like `@flow suppress`, which parses the file as a Flow file (types are parsed) but suppresses all of the errors. This differs from the pragma missing entirely, which causes Flow to ignore the file. The reason it's `@noflow` instead of `@flow suppress` is because `@noflow` is not a prefix of `@flow`, so naive tooling can look for `@flow` without having to negative-match `suppress`.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。