Install TS project presets with Godot Editor
menu item Project > Tools > GodotJS > Install TS Project
.
All
jsb
premade configurations/scripts will be generated at the root of the project (res://
).d.ts
files of godot classes will also be generated at the same time.
Note
typescript
is required to compile all typescript sources, npm i
is needed to be run before writing your scripts.
Since the d.ts
files for godot classes are generated in the TS project, IntelliSense
works perfectly in VSCode for better coding efficiency.
Install javascript packages:
cd YourGodotProject/
npm i
Write and compile your typescript sources:
cd YourGodotProject/
# remove the option `-w` if no continuous compilation required
npx tsc -w