mirror of
https://github.com/arthurfiorette/axios-cache-interceptor.git
synced 2025-12-08 17:36:16 +00:00
refactor: prefer the usage of AxiosResponseHeaders
This commit is contained in:
parent
7dc15be22e
commit
bd4bf26e18
@ -1,8 +1,9 @@
|
||||
import type { AxiosResponseHeaders } from 'axios';
|
||||
import type { MaybePromise } from '../util/types';
|
||||
|
||||
export type CachedResponse = {
|
||||
data?: unknown;
|
||||
headers: Record<string, string>;
|
||||
headers: AxiosResponseHeaders;
|
||||
status: number;
|
||||
statusText: string;
|
||||
};
|
||||
@ -16,12 +17,6 @@ export type StorageValue =
|
||||
|
||||
export type NotEmptyStorageValue = Exclude<StorageValue, EmptyStorageValue>;
|
||||
|
||||
export type StorageMetadata = {
|
||||
/** If the request can be stale */
|
||||
shouldStale?: boolean;
|
||||
[key: string]: unknown;
|
||||
};
|
||||
|
||||
export type StaleStorageValue = {
|
||||
data: CachedResponse;
|
||||
ttl?: undefined;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user