fix: type incompatibility

This commit is contained in:
Arthur Fiorette 2023-12-26 15:46:40 -03:00
parent c68f47d777
commit f96b55dc54
No known key found for this signature in database
GPG Key ID: 6810B9EDBE06FB24

4
src/cache/create.ts vendored
View File

@ -1,4 +1,4 @@
import type { AxiosInstance } from 'axios';
import type { Axios } from 'axios';
import { defaultHeaderInterpreter } from '../header/interpreter';
import { defaultRequestInterceptor } from '../interceptors/request';
import { defaultResponseInterceptor } from '../interceptors/response';
@ -26,7 +26,7 @@ export interface CacheOptions extends Partial<CacheInstance>, Partial<CachePrope
* @returns The same instance with extended typescript types.
* @see https://axios-cache-interceptor.js.org/config
*/
export function setupCache(axios: AxiosInstance, options: CacheOptions = {}): AxiosCacheInstance {
export function setupCache(axios: Axios, options: CacheOptions = {}): AxiosCacheInstance {
const axiosCache = axios as AxiosCacheInstance;
if (axiosCache.defaults.cache) {