mirror of
https://github.com/arthurfiorette/axios-cache-interceptor.git
synced 2025-12-08 17:36:16 +00:00
fix: type incompatibility
This commit is contained in:
parent
c68f47d777
commit
f96b55dc54
4
src/cache/create.ts
vendored
4
src/cache/create.ts
vendored
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user