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

200
Views
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
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!