I have a situation, demo code below:
const callFnWithArgs = (callback: (a: string, b: number) => void) =>
async (a: string, b: number): Promise<void> => {
try {
await callback(a,b)
}
catch(e){
console.log(e)
}
The code works fine, but I have ESLint unused vars property setup in the project. I receive error that a and b are unused-vars in line 1.
Any solution for this? Function signature changes are welcome.
Note:
- I do not wish to disable/bypass the unused vars property globally or here.
- I do not wish to use 'any'
- I do not wish to remove the type so that it would infer 'any'