Johan
October 19, 2016, 9:28am
1
I am trying to use webix together with Angular 2, but I get the following typescript error when trying to use ActiveContent in a Datatable.
TypeScript:
webix.protoUI({ name: “activeTable” }, webix.ui.datatable, webix.ActiveContent);
Error:
error TS2339: Property ‘datatable’ does not exist on type ‘typeof ui’.
I am using the following TypeScript definition file:
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/webix/webix.d.ts
What is the reason for this error and how can I solve it?
maksim
October 20, 2016, 12:16pm
2
Hi,
I can confirm the issue. webix.d.ts file doesn’t provide correct definitions for the above API. We will provide an updated definitions file in next few days.
As fast fix, locate the next line in webix.d.ts
interface datatable extends webix.ui.baseview{
and replace it with
class datatable implements webix.ui.baseview{
Johan
October 21, 2016, 1:38am
3
Hi maksim,
Thank you for your reply.
The same seems to be true for most of the other components as well, I suppose I can just update their definitions in the same way as well?
maksim
October 21, 2016, 9:17am
4
Yep, it can be applied to all components except of the baseview, which need to be defined as an interface.
We will include a similar update in next version of d.ts file.
Johan
November 2, 2016, 10:26am
5
Hi again and thanks,
Any idea of when we can expect the updated typescript file?