Typescript compiler reports two error:
App_Source\libs\jqwidgets-ts\angular_jqxchart.ts(64,16): error TS2339: Property ‘resize’ does not exist on type ‘Window’.
App_Source\libs\jqwidgets-ts\angular_jqxknob.ts(52,16): error TS2339: Property ‘resize’ does not exist on type ‘Window’.
[21:52:02] TypeScript: 2 semantic errors
I compared the file angular_jqxchart.ts between v 4.5.1. to 4.5.2.
The 4.5.1 uses just window.onresize
constructor(containerElement: ElementRef) {
this.elementRef = containerElement;
setTimeout(() => {
if (this.autoCreate) {
this.createComponent();
}
});
window.onresize = () => {
this.__updateRect__();
};
}
the latest 4.5.2 changed to use (window).resize
constructor(containerElement: ElementRef) {
this.elementRef = containerElement;
(window).resize(() => {
this.__updateRect__();
});
}
ngOnInit() {
if (this.autoCreate) {
this.createComponent();
}
};
How to fix this?