In Lodash all function are in the _
namespace. This namespace is located in the window
. So we can access the namespace anywhere. Want to achieve the same but facing an issue. I have to export all my classes manually to a namespace and then to the window
.
I am using webpack to build the project. In the index.ts file:
import _Id from './model/general/Id'
namespace n {
export import Id = _Id.Id
}
globalThis.n = n
Looks not good. How to solve the issue? Maybe there is a package that does the job in npm.