How to use static type in custom signal via GDScript?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By freakcoco

I want to use a signal with arguments in godot v3.1.1 .

Something like this:

signal my_signal(arg: int)
:bust_in_silhouette: Reply From: MallNinjaMax
extends Node

signal my_signal

var number: int = 10
var stringy: String = "Yo"

func _ready():
    connect("my_signal", self, "_testing")
    emit_signal("my_signal", number, stringy)

func _testing (num: int, texty: String): # <--- Here, in the custom method
    print(str(num) + " " + texty)
:bust_in_silhouette: Reply From: Dlean Jeans

It’s not possible, yet. Although, it may be added in 3.2.

See this issue on GitHub.