Typescript Compilation fails for JavaScript PSDK version 211.0.0 and higher

When trying to update a typescript project to use the PSDK 213.0.0, I get following error during compilation:

Error: node_modules/purecloud-platform-client-v2/index.d.ts:125:39 - error TS2552: Cannot find name 'RequestOptions'. Did you mean 'HttpRequestOptions'?

And in fact, editing this type file (index.d.ts) shows that the method toAxiosConfig of DefaultHttpClient uses a parameter of type RequestOptions - this index.d.ts declares only the class HttpRequestOptions, however.

For pure JavaScript development this is not visible, but it completely breaks typescript development - this should be fixed.

Thanks for the notice. A typo I assume. I'll notify the team to fix it.

Regards,

The correct type for that method parameter would be HttpRequestOptions, as it is defined above.

Yes. I have seen that.

It should be fixed in version 213.1.0

Regards,

OK, thanks. Will then wait for that version.

This version is already available - released yesterday.

Regards,

OK, that version compiles and works right - thanks, this can be closed now!
Regards,
Wolfgang

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.