facebook / facebook/flow

Feature request: flow should type check strict equality (`===`)

Ouverte
#2,359 4 commentaires 16 réactions 0 personnes assignées Voir sur GitHub
wishlist
Langage dominant
Rust
Étoiles
22.3k
Forks
1.9k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

I'd like to formalize a request for the feature mentioned in this closed issue: https://github.com/facebook/flow/issues/1584

I have already run into an issue where I was using strict equality checking where I thought I was comparing two instances of the same type, but was in fact not doing so due to some deeply nested references. I.E. my if statement was something like:

`if (foo.bar.baz.x.y === something.else.z)`

but should have been:

`if (foo.bar.baz.x.y.z === something.else.z)`

I only caught the problem at run time, but I expected flow to warn me, which it correctly does if I switch over to ==. Perhaps this could be an advanced .flowconfig setting if this is not what is considered standard in Flow philosophy.

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.