I'm trying to make an interface such that some variable, for example, args, corresponds to the arguments of a given function.
export interface ExecutorTask<T extends any[]> {
args: T;
thisValue: Object;
fn: (...args: T) => any;
}
But I have this error:
Typescript
A rest parameter must be of an array type.
Any help would be greatly appreciated. Thanks!