This commit is contained in:
Arthur Fiorette 2024-10-18 10:53:31 -03:00
parent 2633b9cbe0
commit 2054647d74
No known key found for this signature in database
GPG Key ID: 79FA8EC214FA0233

View File

@ -1,20 +1,13 @@
import type { CacheRequestConfig } from '../cache/axios.js';
import { Header } from '../header/headers.js';
import type { MaybePromise } from '../util/types.js';
import type {
AxiosStorage,
CachedStorageValue,
StaleStorageValue,
StorageValue
} from './types.js';
import type { AxiosStorage, CachedStorageValue, StaleStorageValue, StorageValue } from './types.js';
/** Returns true if the provided object was created from {@link buildStorage} function. */
export const isStorage = (obj: unknown): obj is AxiosStorage =>
!!obj && !!(obj as Record<string, boolean>)['is-storage'];
function hasUniqueIdentifierHeader(
value: CachedStorageValue | StaleStorageValue
): boolean {
function hasUniqueIdentifierHeader(value: CachedStorageValue | StaleStorageValue): boolean {
const headers = value.data.headers;
return (