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

99
Visualizações
NestJS dependency injection and TransformPipe

I've created a module A, that has an exported provider AService. Module B imports module A and has an exported BTransformPipe provider, that uses AService. Now, my understanding is, that when I import module B in module C, I should be able to use BTransformPipe in controller declared in module C, without declaring any further dependencies, but NestJS fails to inject AService in BTransformPipe used in module C. Am I missing anything?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Enhancers don't really go in the providers array nor do they get resolved from there. If you use BTransformPipe in CModule, then CModule needs to have access to all of the dependencis of BTransformPipe. To make this easy to keep track of, your BModule can have AModule in the imports and the exports and then you'll just need to have BModule in the imports of the module where you're wanting to use the BTransformPipe.

about 4 years ago · Juan Pablo Isaza 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