Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

129
Views
How do I properly annotate an export that is result of function call?

I'm working on porting my app to use Flow types. I also use the Nuclide IDE which shows me my flow coverage. I'm trying to get all my files to 100% coverage so I can have type-safe code. I'm encountering a situation in which Nuclide shows that my code doesn't have type coverage, but I'm not sure how to fix it:

const ReduxWrapper = connect(mapState, mapEvents)(Component)
export default ReduxWrapper

Nuclide says that ReduxWrapper isn't covered by Flow. Why is that, and how can I fix it?

Other Notes:

  • I've created library definitions for react-redux which I can add to my question if someone wants to see them.
  • I already tried several ways to type-annotate it, but they just led to errors. I'm asking about my original problem instead of asking about the problems with what I've already tried to avoid the XY problem.
  • This is the hardest question I've ever written on StackOverflow. I like to distill and simplify things but I haven't been able to find a simpler piece of code that replicates my problem. If you need more information to answer just leave a comment and I'll add it.
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can try to use flow-typed library which will add to your project flowtype definitions of your dependencies.

Take a look here https://github.com/flowtype/flow-typed/blob/master/definitions/npm/react-redux_v4.x.x/flow_v0.30.x-/react-redux_v4.x.x.js

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!