I need to have an array of arrow functions like so
//how can we contain the list of tasks?
private _tasks : ((x: T) => boolean)[];
constructor(...tasks : ((x: T) => boolean)[]) {
this._tasks = tasks;
}
is there any way I can do this?
this seems to work for me
private _tasks :Array<(x: T) => boolean>;
T[] is defined to be the same as Array<T> so there is no loss of precision here; in most cases this is the most readable workaround (I personally hate one-overload type literals!)