Compare commits

...

2 Commits

Author SHA1 Message Date
MichaelXt
c2ec7c9f05 Update Node.js to 22.x on GitHub Actions to fix CI ReadableStream error (#979) 2026-02-24 17:44:29 +01:00
BenBlueeeee
4d7c23fe81 Statically type all function snippets (#958)
This also updates snippet names of the type "[name] method of [class]"
to correctly reference the class that defines them.

For example, _draw() was labelled as "of Node" before, but it's actually
CanvasItem which defines this function.
2026-02-04 00:41:52 +01:00
2 changed files with 23 additions and 16 deletions

View File

@@ -63,7 +63,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v5.0.0
with:
node-version: 16.x
node-version: 22.x
- name: Install dependencies
run: npm install

View File

@@ -15,63 +15,70 @@
"_ready method of Node": {
"prefix": "ready",
"body": [
"func _ready():",
"func _ready() -> void:",
"\t${1:pass}"
]
},
"_init method of Object": {
"prefix": "init",
"body": [
"func _init():",
"func _init() -> void:",
"\t${1:pass}"
]
},
"_process method of Node": {
"prefix": "process",
"body": [
"func _process(delta):",
"func _process(delta: float) -> void:",
"\t${1:pass}"
]
},
"_physics_process method of Node": {
"prefix": "physics",
"body": [
"func _physics_process(delta):",
"func _physics_process(delta: float) -> void:",
"\t${1:pass}"
]
},
"_input method of Node": {
"prefix": "input",
"body": [
"func _input(event):",
"func _input(event: InputEvent) -> void:",
"\t${1:pass}"
]
},
"_input_event method of Node": {
"prefix": "inpute",
"_input_event method of CollisionObject2D": {
"prefix": "inpute2D",
"body": [
"func _input_event(event):",
"func _input_event(viewport: Viewport, event: InputEvent, shape_idx: int) -> void:",
"\t${1:pass}"
]
},
"_input_event method of CollisionObject3D": {
"prefix": "inpute3D",
"body": [
"func _input_event(camera: Camera3D, event: InputEvent, event_position: Vector3, normal: Vector3, shape_idx: int) -> void:",
"\t${1:pass}"
]
},
"_unhandled_input method of Node": {
"prefix": "uinput",
"body": [
"func _unhandled_input(event):",
"func _unhandled_input(event: InputEvent) -> void:",
"\t${1:pass}"
]
},
"_draw method of Node": {
"_draw method of CanvasItem": {
"prefix": "draw",
"body": [
"func _draw():",
"func _draw() -> void:",
"\t${1:pass}"
]
},
"_gui_input method of Node": {
"_gui_input method of Control": {
"prefix": "guii",
"body": [
"func _gui_input(event):",
"func _gui_input(event: InputEvent) -> void:",
"\t${1:pass}"
]
},
@@ -181,7 +188,7 @@
"# var a = 2",
"# var b = \"textvar\"",
"",
"func _ready():",
"func _ready() -> void:",
"\t# Called every time the node is added to the scene.",
"\t# Initialization here",
"\tpass",
@@ -282,4 +289,4 @@
],
"description": "Waits for a given amount of seconds"
}
}
}