i would like to know how to add Namespace declaration to my js bundle.
I have typescript class in myclass.ts
export class MyClass{
...
}
I use this class in others files
export {MyClass} from "myclass"
...
let a:MyClass = new MyClass();
I compile it into vs code and use grunt to automate concat of different files and minimify with terser.
Everything is fine except i would like to have a namespace before my class when use it in js
<script src="mylib.min.js"></script>
...
var a = new MYLIB.MyClass();
Where in the process do i introduce the "MYLIB" namespace ? I want to continue to work on the export/import pattern so i do not want to include the namespace nor module name inside TS file.
Is there a grunt plugin to doing so ? I do not find any clear informations, nor samples, on the topic.