facebook / facebook/flow

Document @flow pragmas better

Ouverte
#1,382 7 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Needs docs
Langage dominant
Rust
Étoiles
22.3k
Forks
1.9k
Métriques de merge des PR
Aucune PR mergée en 30 j

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`.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.