I have a small ts library that gets outputed as UMD and I also output the *.d.ts file automatically via tsconfig: "declaration": true.
The file being exported looks like:
export class Blue {
alert(): void {
console.log('alerted');
}
}
Using exported UMD module declares a window.myLib variable.
The d.ts file looks like:
export declare class Blue {
alert(): void;
}
Now, either via webpack, or a typescript option that I have not found I would like to also generate in the d.ts file the following line:
export as namespace myLib;
Is there a way to do this? Thanks.