I'm having trouble defining interfaces with function members that accept variable amounts of arguments. Take the following object literal as an example:
var obj = {
func: () => {
for(var i = 0; i < arguments.length; i++) {
console.log(arguments[i]);
}
}
};
I'd like to be able to define an interface such as:
interface IExample {
func: ( ??? ) => void;
}
So that the following code can compile without error:
var test = (o: IExample) {
o.func("a");
o.func("a", "b");
o.func("a", "b", "c");
...
}