I'm trying to create typed functions using optional parameters sans the
defaults. I'm finding String to be the only thing that allows for null to be
passed. Is there a way to extend that functionality to other types like;
Numbers, Booleans, and/or ints?
NOTE : I am aware of ...rest and passing an
Hi,
You can have * to specify any parameter:
function myFunc(param1:Boolean, param2:*);
Matthew Houliston wrote:
don't you mean
function test2 ( a:Boolean = false )
{
trace( a: + ( a == true ) );
}
?
A Boolean is never null.
var b:Boolean;
trace(b);
2 matches
Mail list logo