Typescript ajax call issue when migrating from 6.2.6 to 6.4.X

Hello,

I have a issue to use latest webix library with typescript and type definition of ajax call.

This line:
return webix.ajax()
.get(url, param, (text, data, request) => { …}).
.then( …

return this error:
TS2339: Property ‘get’ does not exist on type ‘Ajax | Promise’.
Property ‘get’ does not exist on type ‘Promise’.

Regards

as a workaround
in webix.global.d.ts replace

function ajax(url?: string, params?: any):webix.Ajax | Promise<any>;

with

function ajax(url: string, params?: any):Promise<any>;
function ajax():webix.Ajax;

thanks.

If a new version can be deployed that will be nice (I use pro version),

1 Like