I’m maintaining a TypeScript definition file for exactly that purpose.
You can find more info here:
It only works for auto completion, not running your script in node.js.
I’m using VisualStudio Code on Windows. Since I needed quite a lot testing, iCloud drive sync wasn’t fast enough for me, so I used Git for Windows to push the script to a private Gist and used a script to download it on iOS:
One caveat: The script cannot download files into folders, only directly into the documents folder of Scriptable as far as I know. And it has to be run after you’ve pushed with Git otherwise you see an old version.