Skip to content

Commit 38576df

Browse files
committed
Commented on why having chosen *any* instead of *Function* for ICommand implementor classes
1 parent 6fe89c5 commit 38576df

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/org/puremvc/typescript/multicore/patterns/command/MacroCommand.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,13 @@ module puremvc
104104
var len:number = this.subCommands.length;
105105
for( var i:number=0; i<len; i++ )
106106
{
107-
//TODO Identify if here *any* is the right choice instead of Function ( won't compile if set to Function because it is not newable on new commandClassRef )
107+
/*
108+
* Typed any here instead of <code>Function</code> ( won't compile if set to Function
109+
* because today the compiler consider that <code>Function</code> is not newable and
110+
* doesn't have a <code>Class</code> type)
111+
*/
108112
var commandClassRef:any = subCommands[i];
109-
var commandInstance:ICommand = new commandClassRef();
113+
var commandInstance:ICommand = <ICommand> /*</>*/ new commandClassRef();
110114
commandInstance.execute( notification );
111115
}
112116

0 commit comments

Comments
 (0)