I have the following code:

```
this.somePromiseFn<T>  // this fn is actually a promise
.then(res => res as T)
.catch(err => this.handleError<T>(err));

handleError<T>(err: HttpErrorResponse) {
  // do something here
  // and return like
  return {} as T;
}

```

The above code works fine. But how I can pass the `err` argument directly to the `handleError` method without using another callback function. As `catch` by default passes the `err` to the callback function, it should also pass the `err` to the `handleCatchError`. I want something like:

```
this.somePromiseFn<T>
.then(res => res as T)
.catch(this.handleCatchError<T>); // this line gives error 'An argument for 'err' was not provided'

```

But the above code produces the error saying:

> 
> Expected 1 argument, but got 0.   
> 
>  An argument for 'err' was not provided.
> 
> 
> 

Though I have visited the following question already:

> 
> 1. [addEventListener calls the function without me even asking it to](https://stackoverflow.com/questions/16310423/addeventlistener-calls-the-function-without-me-even-asking-it-to)
> 2. [Javascript "addEventListener" Event Fires on Page Load](https://stackoverflow.com/questions/2373995/javascript-addeventlistener-event-fires-on-page-load)
> 
> 
> 

But the above questions also suggest using another callback function.