You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
429 B
14 lines
429 B
declare type Timer = ReturnType<typeof setTimeout>;
|
|
export declare type CachedKeyType = string | number;
|
|
export declare type cachedData = {
|
|
data: any;
|
|
timer: Timer | undefined;
|
|
startTime: number;
|
|
};
|
|
declare const setCache: (key: CachedKeyType, cacheTime: number, data: any) => void;
|
|
declare const getCache: (key: CachedKeyType) => {
|
|
data: any;
|
|
startTime: number | undefined;
|
|
};
|
|
export { getCache, setCache };
|