From bd4bf26e1846e3579eba7dba379c0f3560432c8a Mon Sep 17 00:00:00 2001 From: arthurfiorette Date: Wed, 19 Jan 2022 08:07:21 -0300 Subject: [PATCH] refactor: prefer the usage of `AxiosResponseHeaders` --- src/storage/types.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/storage/types.ts b/src/storage/types.ts index c117eea..6c9bcbd 100644 --- a/src/storage/types.ts +++ b/src/storage/types.ts @@ -1,8 +1,9 @@ +import type { AxiosResponseHeaders } from 'axios'; import type { MaybePromise } from '../util/types'; export type CachedResponse = { data?: unknown; - headers: Record; + headers: AxiosResponseHeaders; status: number; statusText: string; }; @@ -16,12 +17,6 @@ export type StorageValue = export type NotEmptyStorageValue = Exclude; -export type StorageMetadata = { - /** If the request can be stale */ - shouldStale?: boolean; - [key: string]: unknown; -}; - export type StaleStorageValue = { data: CachedResponse; ttl?: undefined;