I have class example:
export class Test{
private func: (...args: any[]) => void;
constructor(func: (...args: any[]) => void) {
this.func = func;
}
method(...args: any[]) {
return this.func(...args);
}
}
I want to not see TS warning that the arguments not in constructor, and i want to see TS warning that the method require "testFunction" function arguments.
Use example:
const testFunction = (a: number, b: string) => {}
const test = new Test(testFunction); // I want to not see TS warning that the arguments were not passed
test.method(1, 'e') // I want to see TS warning that the method require "testFunction" function arguments