UNPKG

@intlayer/config

Version:

Retrieve Intlayer configurations and manage environment variables for both server-side and client-side environments.

20 lines 1.03 kB
//#region src/utils/cacheMemory.d.ts /** Public stringify kept for convenience / debugging (now faster & broader). */ declare const stableStringify: (value: unknown, _stack?: WeakSet<object>) => string; /** Compute a compact, stable id for arbitrary key tuples. */ declare const computeKeyId: (keyParts: unknown[]) => string; /** ------------------------- In-memory cache ------------------------- **/ type CacheKey = unknown; declare const getCache: <T>(...key: CacheKey[]) => T | undefined; type CacheSetArgs<T> = [...keys: CacheKey[], value: T]; declare const setCache: <T>(...args: CacheSetArgs<T>) => void; declare const clearCache: (idOrKey: string) => void; declare const clearAllCache: () => void; declare const cacheMemory: { get: <T>(...key: CacheKey[]) => T | undefined; set: <T>(...args: CacheSetArgs<T>) => void; clear: (idOrKey: string) => void; }; //#endregion export { CacheKey, cacheMemory, clearAllCache, clearCache, computeKeyId, getCache, setCache, stableStringify }; //# sourceMappingURL=cacheMemory.d.ts.map