Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

135
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda