@jjordy/swr-devtools
Version:
Devtools for SWR
15 lines (14 loc) • 523 B
TypeScript
import { Cache } from "swr";
export declare type SWRCacheData = {
id: number;
key: string;
data: any;
isValidating: boolean;
error: string;
timestamp: Date;
timestampString: string;
};
export declare const injectSWRCache: (cache: Cache, watcher: (key: string, value: any) => void) => void;
export declare const isMetaCache: (key: string) => boolean;
export declare const isInfiniteCache: (key: string) => boolean;
export declare const getInfiniteCacheKey: (key: string) => string;