I have
interface MyClass {
do(d: 1 | -1): this
}
interface MyClassConstructor {
new<T> (cfg?: T & MyClass): MyClass & T
}
interface Window {
MyClass: MyClassConstructor
}
What went wrong with my definition as I couldn't make the follow work
var instance = new MyClass({
undo: function() { this.do(-1) }
});
instance doesn't show Class members properly
Edit 1: I'm using Typescript 2.3.2. And the definition is to have intellisense in Javascript
Edit 2: I'm doing this to have better ideas of what the existing members are when calling new MyClass({ ... }) in my JS

You cannot instantiate interfaces.
Your interfaces are not being translated into js by compiler so at runtime there's no such thing as
MyClass.You'll need to create a class like so:
(code in playground)
Or you can have it this way:
Edit
If you already have an implementation for
MyClassthen this is what you need: