facebook / facebook/flow

Inline if ignores object types

Aperta
#3,338 3 commenti 2 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
22.3k
Fork
1.9k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

This will throw the expected error "property `responseCodeARGH`. Property not found in"
```
const isNotFound = res.apiActionResults[0].responseCodeARGH === 333;

return isNotFound ? [] : res.body.order_ids.split(',');
```

This will not:
```
return res.apiActionResults[0].responseCodeARGH === 333 ? [] : res.body.order_ids.split(',');
```

The only difference logically here is a variable substitution.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.