Skip to content

Flow error Promise #22101

Closed
Closed
@exced

Description

@exced

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions