Closed
Description
- Review the documentation: https://facebook.github.io/react-native
- Search for existing issues: https://github.com/facebook/react-native/issues
- Use the latest React Native release: https://github.com/facebook/react-native/releases
Environment
[skip envinfo]
Description
It seems there's a Flow type Error in Libraries/Core/polyfillPromise.js
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ Libraries/Core/polyfillPromise.js:21:33
Importing from an untyped module makes it any and is not safe! Did you mean to add // @flow to the top of Promise?
(untyped-import)
18│ * If you don't need these polyfills, don't use InitializeCore; just directly
19│ * require the modules you need from InitializeCore for setup.
20│ */
21│ polyfillGlobal('Promise', () => require('Promise'));
22│
This error could be solved by changing // @flow strict-local annotation to // @flow in Libraries/Core/polyfillPromise.js file but I guess we would like to fix the error in Promise module.
Reproducible Demo
yarn && yarn run flow
You'll see a Flow type error