UNPKG

mastercache

Version:

Multi-tier cache module for Node.js. Redis, Upstash, CloudfareKV, File, in-memory and others drivers

17 lines (14 loc) 571 B
import { Duration } from './types/helpers.js'; import 'typescript-log'; /** * Resolve a TTL value to a number in milliseconds */ declare function resolveTtl(ttl?: Duration, defaultTtl?: Duration): number | undefined; /** * Useful for creating a return value that can be destructured * or iterated over. * * See : https://antfu.me/posts/destructuring-with-object-or-array */ declare function createIsomorphicDestructurable<T extends Record<string, unknown>, A extends readonly any[]>(obj: T, arr: A): T & A; export { createIsomorphicDestructurable, resolveTtl };