I'm having a strange issue. In the first case, when React Native is not required, the type inference for getMove() is working, but the compiler doesn't properly infer the type of imported styles.
// var React = require('react-native');
var {
cellX, cellO
} = require('../styles');
var PlayerStore = createStore({
getMove(): Array<Array<number>>{
return "1"
}
string
This type is incompatible with
array type
object pattern
Property not found in
styles.js: exports
And when I uncomment the require for React Native, it doesn't infer the return type of getMove() at all. It looks like there is nothing wrong with the file.
I'm having a strange issue. In the first case, when React Native is not required, the type inference for
getMove()is working, but the compiler doesn't properly infer the type of imported styles.And when I uncomment the require for React Native, it doesn't infer the return type of
getMove()at all. It looks like there is nothing wrong with the file.