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

212
Visualizações
Exporting utility functions from multiple files

I recently came across several files in a typescript/javascript codebase that are re-exporting utilities from other files. I came across it because my IDE didn't detect the function references when they were being re-exported. Initially my IDE said there were about 20 references but it looks like there are possibly 10x that as I find the files re-exporting one runtime error at a time.

The purpose seems clear, so the individual could take a dozen different utilities and * import them from one file. While this seems like a questionable practice I was curious if there are other reasons for or against doing this.

a folder might contain a file at the top level like:

export { fiz } from 'somefile'
export { baz } from 'someotherfile'

export const buz = ...

usage:

import * as funcs from ...

funcs.fiz()
funcs.baz()
funcs.buz()
about 4 years ago · Juan Pablo Isaza
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