I have a typescript definition file with an interface like
interface IStreamHandler<E> {
stopStream(): void;
process(E : E);
onReady(bReady : boolean):void;
}
I want to instantiate this so I declare a variable like
declare var StreamHandler: IStreamHandler<E>;
but this is not allowed.
How do I create the definition syntax so i could do this ?
var sh = new StreamHandler<Animal>();
sh.process(E: Animal){//code impl}