useGlobalCache.d.ts 470 B

12345
  1. import { type KeyType } from '../Cache';
  2. export type ExtractStyle<CacheValue> = (cache: CacheValue, effectStyles: Record<string, boolean>, options?: {
  3. plain?: boolean;
  4. }) => [order: number, styleId: string, style: string] | null;
  5. export default function useGlobalCache<CacheType>(prefix: string, keyPath: KeyType[], cacheFn: () => CacheType, onCacheRemove?: (cache: CacheType, fromHMR: boolean) => void, onCacheEffect?: (cachedValue: CacheType) => void): CacheType;