Document @flow pragmas better
- Dominant language
- Rust
- Stars
- 22.3k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
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`.
Contributor guide
Assessment
This issue has not been assessed yet.