I encountered an issue while trying to add a cookie jar to an axios instance. The problem arises because the interface AxiosRequestConfig does not have a member named "jar". Is there any way to enhance the existing AxiosRequestConfig type or is there a workaround for this situation?
const tough = require('tough-cookie');
const axiosCookieJarSupport = require('axios-cookiejar-support').default;
//...
const instance = axios.create();
axiosCookieJarSupport(instance);
instance.defaults.jar = new tough.CookieJar();
When TypeScript throws the error message "Property 'jar' does not exist on type 'AxiosRequestConfig'", it raises a valid concern. How can I resolve this issue effectively?