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.