gdscript variable type code example
Example 1: godot declare variable return type
To declare the return type of a function, use -> <type>:
func heal(amount: int) -> void:
Example 2: godot declare variable type
To declare a variable's type, use <variable>: <type>:
var health: int = 0