Skip to main content
Version: 4.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

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