You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update README with code completion hints
Modified the Typescript section to also reference JSX code completion, with instructions on how to add the definitions .ts file to the package.json for JSX code completion support.
* Add types def to package.json
* Update README.md
- Run the menu command `Project > Tools > ECMAScript > Generate TypeScript Project` from the godot editor to generate a TypeScript project
158
158
- Run `tsc -w -p .` under your project folder in the terminal to compile scripts
159
159
160
+
#### Code completion
161
+
- Code completion in TSX will automatically work once the TypeScript project is generated by the above steps.
162
+
- Code completion in JSX in VS Code is achieved by the property `"types": "./godot.d.ts"` in the generated package.json file of the TypeScript project. The `godot.d.ts` file can be generated alone via the `Project > Tools > ECMAScript > Generate TypeScript Declaration File` editor menu option and added to a `package.json` file manually to achieve this without a full TypeScript project.
163
+
160
164
#### Example TypeScript Usage
161
165
162
166
Make sure the file with extension '.tsx' so it can be compiled to a `.jsx` file then we can attach it to a node in godot editor.
0 commit comments