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()