I'm currently working on developing DefinitelyTyped for a private package where I am unable to modify the source code. I am facing challenges in implementing a type structure like this:
GlobalNameSpace.SuperClass = function(arg) {}
GlobalNameSpace.superClass = new GlobalNameSpace.SuperClass(args)
This is what I have tried so far:
declare namespace GlobalNameSpace {
class SuperClass {}
const superClass = new GlobalNameSpace.SuperClass(args);
}
Unfortunately, when I attempt this method, I encounter an error in VS Code.
A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.
Does anyone have any insights on how to resolve this issue?