typescript1.8 - Changed Typescript-Version -


i have project written in typescript v.1.4 "ecma6" , want use 'async' because of calculations needed asynchronous.

but after upgrade typescript version 1.8 in visual studio 2013, got big problems extended classes , have no idea why?

the exception is:

class constructor "xyz"cannot invoked without 'new'

the classes looks extend b, b extend c...

class xavobject {     constructor() { }    }  class xavwidget extends xavobject {     constructor(control: jquery, name?: string, id?: number) {         super();     } }  class widget_constructionkitcontainer extends xavwidget {     constructor(control: jquery, controlname: string) {         super(control, controlname, 1); // ---> here throws exception     } } 

why exception occurs , can resolve it?

edit: try give more information...

i have webservice written in c# wich makes .js-files .ts-files accessible. "http://localhost:8080/dllname/xavobject.js"

so html looks like:

 <script src="xavobject.js"></script>  <script src="xavwidget.js"></script>  <script src="widget_constructionkitcontainer.js"></script>    <script>         xavmanager.jquery(document).ready(function () {           var constructionkitcontainer =           new widget_constructionkitcontainer(           xavmanager.jquery('#constructionkitcontainer'),           "constructionkitcontainer",            xavmanager.jquery('#regionselector'),           xavmanager.jquery('#regionconfigurator'),           xavmanager.jquery('#regioncontainer'),           xavmanager.jquery('#preview'),           xavmanager.jquery('#threedcontainer'),           xavmanager.jquery('#mainthreed'),            xavmanager.jquery('#navthreed'),            [xavmanager.jquery('#modeltypauswahl'),           xavmanager.jquery('#modelformauswahl'),           xavmanager.jquery('#wandartikelauswahl'),           xavmanager.jquery('#ebeneauswahl'),           xavmanager.jquery('#elementauswahl'),           xavmanager.jquery('#materialauswahl'),           xavmanager.jquery('#setartikelauswahl'),           xavmanager.jquery('#griffartikelauswahl')],            constanten           );         });  </script> 

after call page, last script executed , throws exception.

the structure of project looks like:

so 3 classes in 3 files , 2 of them in same libori, other 1 in another.

edit part2:

after have restarted pc error message disappears ... error in js-file appears....

syntax error only in js-file can't compile 1 file

class selectionrules extends validationrules {     protected _getnewtimedoutobject():         validationrules_timeoutitem_calculate|selectionrules_timeoutitem_calculate {        return new selectionrules_timeoutitem_calculate();    } }  class selectionrules_timeoutitem_calculate extends     validationrules_timeoutitem_calculate {    public lielement: htmlelement; }  class validationrules_timeoutitem_calculate {    public timeout: number;    public setting: widget_configuratorbase_object_setting;    public searchstring: string;    public errortext: string;    public value: string = "";    public dataelement: widget_article_setting;    public containerentryindex: number; } 

is because these part? validationrules_timeoutitem_calculate|selectionrules_timeoutitem_calculate

but why these lines work typescript 1.4?

after tons of hours got it....

after upgraded typescript, restart visual-studio! if work ecma6 , double typed parameter/functions validationrules_timeoutitem_calculate|selectionrules_timeoutitem_calculate need change solution-options ecma5 same issue new generated classes! --> ecma5 work after compile these work


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -