Skip to main content
Version: 3.x.x

getCacheData


import { getCacheData } from "@hyper-fetch/core"

Description

Defined in cache/cache.utils.ts:5

Preview

getCacheData<T>(previousResponse, response)

Parameters

NameDetails

previousResponse

Required

ExtractAdapterReturnType<T>

response

Required

ExtractAdapterReturnType<T> & ResponseDetailsType

Returns

{
additionalData: T extends BaseAdapterType<any, any, any, infer A, any> ? A : never | null;
data: GenericDataType | null;
error: GenericErrorType | null;
isSuccess: boolean;
status: T extends BaseAdapterType<any, any, infer S, any, any> ? S : never | null;
isCanceled: boolean;
isOffline: boolean;
retries: number;
timestamp: number;
}