--

I still do not understand why the 3.0. Yet, I do not see the problem of "function name pollution".

That pattern emerges from the necessity of keeping the bundles smaller. If you import a whole object, there is no pruning, although you use one single method.

And if you want to have everything in a single object, you can do `import * as userFacade from './util';`. Each file exports will be encapsulated in its own object, so, no problem for this. Anyway, the best approach would be to use the most predictable structure for that file.

The only problem is the name `utils.ts`. I do not if it is because the author was lazy, or because it is his actual recommendation. In which case, I would not approve either.

Is that what you meant with function pollution?

--

--

David Rodenas PhD
David Rodenas PhD

Written by David Rodenas PhD

Passionate software engineer & storyteller. Sharing knowledge to advance our skills. Join me on a journey of discovery in the world of software engineering.

No responses yet