interface IMySocks {
start(): void;
}
declare var $;
class MySocks implements IMySocks {
private address: string;
private protocols = [];
private mySock: WebSocket;
start() {
this.mySock = new WebSocket(this.address, this.protocols);
this.mySock.onclose = this.onclose;
this.mySock.onopen = this.onopen;
this.mySock.onerror = this.onerror;
this.mySock.onmessage = this.onmessage;
}
private onopen(): void {
this.sendIt();
console.debug("OPEN");
}
private sendIt() {
.....}
var my: IMySocks = new MySocks(); my.start();
So such class comes to Error in the subject. Intellisense and compilation found no error in typescript file. I am using VS2012 Ultimate update 2 with typescript 1.0. What wrong ?
Trhe problem raises when I call this.sendIt();