I trying to call a a function inside a array. I get an error message : The expression type { function } is not assignable to boolean.
Declaration:
public conditions: { (value: any): bool; }[] = [];
Usage:
var myBool: bool = conditions["myKey"]("someParam");
Whats wrong here ? Do i need to cast here ?
var conditions: { (value: any): bool; }[] = []; var myBool: bool = conditions["myKey"]("someParam");compiles fine for me.