Vscode intellisense when using CDN

Hi,

Is it possible to have intellisense in VSCode when loading the SDK via CDN, so basically pure vanilla HTML/JS?
in html header:

<script src="https://sdk-cdn.mypurecloud.com/javascript/203.0.0/purecloud-platform-client-v2.min.js"></script>

in javascript file:

const platformClient = require('platformClient');
const client = platformClient.

After typing the dot, intellisense will not suggest ApiClient?

When developeing a node app (install SDK via npm), it does work.

The TypeScript definition file is in the package, which is why it works via node. But when you only load the transpiled JS file, your IDE has no way to know where to find the typings to apply to it. I'd recommend looking on internet forums for VS Code support to see if it has a way to handle this. If there is a way, you can obtain the definition file from here: https://github.com/MyPureCloud/platform-client-sdk-javascript/blob/master/build/index.d.ts.

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