TypeScript error

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?

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{

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?

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.

Hi again and thanks,

Any idea of when we can expect the updated typescript file?