In C#, when we write using System;
in many files, we can reduce its repetition by writing it as global using System;
in one file, and then all files have it.
I see myself constantly writing import { camelize } from "base"
and many more imports.
It would be a great help not to repeat it repeatedly.
The main reason for this is refactoring. When the name of the imported module changes, or the barrel name changes, we should reflect those changes in many places.
Using global imports, we can reduce that refactoring cost, make our codes one step cleaner, and reduce the boilerplate.
And AMAIK, this won't cause problems in tree-shaking, because that module is already imported once and would be part of the final tree.
The proposed syntax is:
global import { camelize } from "base"
This means that all files will get this import.