So I have a rather complicated setup which is conceptually available in this codesandbox and fully available on gitlab.
The gist of it is this: I'm using
namespace Module {
export class Foo {}
export namespace Foo {
interface ForExtension {}
}
}
declare global {
export import Foo = Module.Foo
}
to make both the class and the merged namespace available in the global namespace. I'm doing that so that consumers of my library can put their own values in the ForExtension interface, similar to how HTMLElementTagNameMap and such work.
The interesting thing is, that this works in one instance, doesn't in another and the codesandbox tells me that export import isn't even allowed in augmentations... but that error never appears in my local environment? Same tsconfig and typescript version 🤔
So yeah, no idea how to proceed from here, how do I even begin to debug this?
P.s.: if you have a better idea on how to make a class and a namespace globally available, I'm all ears. Have been trying around with this for close to a year now...