kuitos / axios-extensions

🍱 axios extensions lib, including throttle, cache, retry features etc...
MIT License
831 stars 49 forks source link

cacheAdapterEnhancer first parameter must be of type "AxiosAdapter | undefined" #8

Closed javi-moralesf closed 6 years ago

javi-moralesf commented 6 years ago

cacheAdapterEnhancer method expects as first value an adapter of type "AxiosAdapter" but the axios.defaults.adapter type is "AxiosAdapter | undefined". This is causing an error when using TypeSCript

kuitos commented 6 years ago

Sorry for delay, I am in spring festival vacation 😀.

Maybe you need cast the axios.defaults.adapter to AxiosAdapter type.

cacheAdapterEnhancer(axios.defaults.adapter as AxiosAdapter, true)
kuitos commented 6 years ago

closed