How to specify a function type with multiple arguments in Haxe?

I am trying to specify the type of function for a function that receives two or more parameters. For a function with one parameter, it's easy:

var myFunction : Int -> Void; 

You can reference this function:

 function doSomething ( param1 : Int ) : Void { ... } ... myFunction = doSomething; 

But how do you refer to a function with two or more parameters? Unfortunately, there is still no complete documentation .

Thanks in advance!

+4
source share
1 answer

My hux is a little rusty, but ...

 var myFunction : Int -> Int -> Void; 

A function that takes two arguments of Int and returns Void .

+5
source

All Articles