How can I write typescript cospaces SDK code inside VSCODE?

how can I write typescript cospaces SDK code inside VSCODE?

VSCODE is a IDE that help autocomplete and much other things, and I usually code on it and fell more productive.

how can I have typescript types autocomplete intellisense inside vscode?

basically if I click . I should see a dialog with all the options I can use (I don’t need to run the code inside vscode, but only code it, and then once complete I will copy and paste inside cospaces)

image
image

I also saw that in the website https://cospaces.io/api/globals.html there is a footer with text generated using TypeDoc, so maybe there is a huge file with all types which I can download and use it to get automatic intellisense in vscode?

2 Likes

actually the typescript file can be accessed in a tricky way:

  1. hover a Codespaces Official Type like Vector3

image

  1. right click on the official Type, so it will open a popup:

image

  1. then click Go To References:

image

  1. click on scripting-api-1.2.0.d.ts in your right:

image

  1. now once clicked, you can see on your left the typescript code (2500+ lines of code):


I am not sure if it it will work in VSCODE, but for now I will use the web embedded one

2 Likes