facebook / facebook/flow

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

Đang mở
#2,359 4 bình luận 16 reaction 0 người được giao Xem trên GitHub
wishlist
Ngôn ngữ chính
Rust
Star
22.3k
Fork
1.9k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.