facebook / facebook/flow

Flow typechecking fail when importing via absolute path with react-native

Aperta
#4,186 13 commenti 12 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

Flow doesn't correctly resolve types when it is imported via absolute path.
I'm using react-native.

Here is an example:

![](https://media.giphy.com/media/3ohze00BxmkOOETDyw/giphy.gif)

/src/package.json (according to [this](https://medium.com/@davidjwoody/how-to-use-absolute-paths-in-react-native-6b06ae3f65d1)

```
{ "name": "@src" }
```

/.flowconfig
```
module.name_mapper='@src/helpers/verseToStrong' -> '/src/helpers/verseToStrong.js' // testing directly in case this was related with bad regexp
module.name_mapper='^@src\(.*\)$' -> '/src/\1'
```

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.