I have installed Typescript just to have WScript intellisense in VScode.
And I got it. But whenever I compile a typescript tsc myScript.ts
containing WScript method WScript.Echo("hello world")
, it generates a .js file and evidently Nodejs does not interpret, saying that WScript has not been defined. Of course, I don't want .js, I want .vbs...
Then Typescript doesn't support VBscript?!
As far as I know, WScript.exe | CScript.exe are Windows Script Host interpreters, created to break free from the web (server and browser), running in the operating system and auto-interpreted in files like .vbs or .wsf, or up to JScript, but it has nothing to do with Javascript. So why does the Typescript language server give WScript snippets if it can't compile or understand VBscript syntax?
In other words, how do I leverage WScript intellisense for VBscript? Will I always have to create a blank .ts file to see it expand the WScript methods, then copy and paste to pass it to my .vbs?
It's probably not possible to get it working as you want for VBScript. You may be better served by spending $59 for a lifetime license for VBSEdit. It includes intellisense for VBScript.