UNPKG

@slan-health/taro-vueuse

Version:

taro vue版本hooks

16 lines (14 loc) 477 B
import { Timeout } from './types'; export type CacheData<R = any, P = any> = { data: R; params: P; time: number; }; export type CacheResultType = CacheData & { timer?: Timeout; }; type CacheKey = string; export declare const getCache: (cacheKey: CacheKey) => CacheResultType | undefined; export declare const setCache: (cacheKey: CacheKey, cacheTime: number, data: CacheData) => void; export declare const clearCache: (cacheKey?: CacheKey) => void; export {};