Following is some code and we are facing lint issues:-
export function TakeUntilDestroy(destroyMethodName = 'ngOnDestroy') {
return function <T extends { new(...args: any[]): {} }>(constructor: T) {
// some code
}
}
I am getting two lint issues on 2nd line of the code. First one is "non-arrow functions are forbidden". We don't want to remove the lint rule to get rid of this error.
2nd lint issue is "Type literal has only a call signature - use 'new(...args: any[]) => {}' instead.
I am not able to resolve the issues. I tried few things but could not resolve the same. These issues are new to me.