What is the type of a delegate in JavaScript?

I am trying to implement a callback/delegate in JS. However, I can’t figure out the type of the variable.

var callback;

function Start()
{
 callback = FooBar;
 callback();
}

function FooBar()
{
 Debug.Log("FooBar");
}

This works, as expected. However, if I wish to specify a type for the callback variable, what should it be? Will this also works with strict mode enabled?[/code]

The type should be Boo.Lang.ICallable if I’m not mistaken.

Not sure, but the type could be “Function”. Like “var callback:Function”.

If you’re interested in callbacks with Unity, check out this VS example project here. The whole repository: here.

Here’s a video about it: http://www.youtube.com/watch?v=KytO48w7fOI