refactor: prefer the usage of AxiosResponseHeaders

This commit is contained in:
arthurfiorette 2022-01-19 08:07:21 -03:00
parent 7dc15be22e
commit bd4bf26e18
No known key found for this signature in database
GPG Key ID: 9D190CD53C53C555

View File

@ -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;