Closed eng1n88r closed 5 years ago
For the first type mismatch the following helped: Changing from:
axios.defaults.adapter = cacheAdapterEnhancer(axios.defaults.adapter);
To
axios.defaults.adapter = cacheAdapterEnhancer(axios.defaults.adapter!);
For the second issue probably TS Module Augmentation could be used in typings, something like
declare module 'axios' {
interface AxiosRequestConfig {
cache?: boolean | true;
}
}
But I'm not sure where this could be added, so we got it with npm install.
Having troubles with setting up caching with axios-extensions:
axios.defaults.baseURL = process.env.VUE_APP_API_BASE_URL; axios.defaults.params = { client_id: process.env.VUE_APP_CLIENT_ID, client_secret: process.env.VUE_APP_CLIENT_SECRET }; axios.defaults.adapter = cacheAdapterEnhancer(axios.defaults.adapter);
Throws