Getting error in Colyseus multiplayer client

I am trying to use Colyseus for haxe:

I am getting error with the following piece of code in Client.hx which is part of the library . It says unexpected,

   @:generic
    public function joinOrCreate<T>(roomName: String, options: Map<String, Dynamic>, stateClass: Class<T>, callback: (String, Room<T>)->Void) {
        this.createMatchMakeRequest('joinOrCreate', roomName, options, stateClass, callback);
    }

I think it’s this callback signature:

(String, Room<T>)->Void

This is valid in Haxe 4 but not in Haxe 3. The Haxe 3 representation would look like this:

String->Room<T>->Void
1 Like