0
///<reference path="HtmlElementsAction.ts" />
///<reference path="DesktopSocket.ts" />
module Pong {
export class webPage extends HtmlElementsAction {
private socket;
constructor() {
super();
this.socket = new DesktopSocket(this);
}
}
}
我已經這段代碼。Typescript在類中創建新實例
當我執行它,在瀏覽器的控制檯錯誤:
Uncaught TypeError: undefined is not a function
錯誤是新DesktopSocket(this);
我在做什麼錯?