diff --git a/src/cache/cache.ts b/src/cache/cache.ts index 29b2118..e11991f 100644 --- a/src/cache/cache.ts +++ b/src/cache/cache.ts @@ -10,7 +10,7 @@ import type { CacheAxiosResponse, CacheRequestConfig } from './axios'; * @template R The type returned by this response * @template D The type for the request body */ -export type CacheProperties = { +export type CacheProperties = { /** * The time until the cached value is expired in milliseconds. * diff --git a/src/util/types.ts b/src/util/types.ts index f988dc3..5bd92c0 100644 --- a/src/util/types.ts +++ b/src/util/types.ts @@ -5,12 +5,12 @@ import type { StorageValue } from '../storage/types'; -export type CachePredicate = Exclude< +export type CachePredicate = Exclude< CachePredicateObject | CachePredicateObject['responseMatch'], undefined >; -export type CachePredicateObject = { +export type CachePredicateObject = { /** Matches if this function returned true. */ statusCheck?: (status: number) => boolean; @@ -29,7 +29,7 @@ export type CachePredicateObject = { }; /** A simple function that receives a cache request config and should return a string id for it. */ -export type KeyGenerator = ( +export type KeyGenerator = ( options: CacheRequestConfig ) => string;