ฉันกำลังพยายามสร้างวัตถุใหม่ของพารามิเตอร์ประเภทในชั้นเรียนทั่วไปของฉัน ในห้องเรียนของฉันViewฉันฉันมี 2 รายการของวัตถุประเภททั่วไปที่ส่งผ่านเป็นพารามิเตอร์ประเภท แต่เมื่อฉันพยายามที่จะทำnew TGridView()TypeScript พูดว่า:
ไม่พบสัญลักษณ์ 'TGridView
นี่คือรหัส:
module AppFW {
    // Represents a view
    export class View<TFormView extends FormView, TGridView extends GridView> {
        // The list of forms 
        public Forms: { [idForm: string]: TFormView; } = {};
        // The list of grids
        public Grids: { [idForm: string]: TGridView; } = {};
        public AddForm(formElement: HTMLFormElement, dataModel: any, submitFunction?: (e: SubmitFormViewEvent) => boolean): FormView {
            var newForm: TFormView = new TFormView(formElement, dataModel, submitFunction);
            this.Forms[formElement.id] = newForm;
            return newForm;
        }
        public AddGrid(element: HTMLDivElement, gridOptions: any): GridView {
            var newGrid: TGridView = new TGridView(element, gridOptions);
            this.Grids[element.id] = newGrid;
            return newGrid;
        }
    }
}
ฉันสามารถสร้างวัตถุจากประเภททั่วไปได้หรือไม่?
new()ความต้องการก็จะดีขึ้น - หรือแบบทั่วไปที่มากขึ้น:type: {new(...args : any[]): T ;}