import Redis from './Redis.js'; /** * Defines a type alias for specifying the cache type as 'redis'. */ export type CacheType = 'redis'; /** * Defines a CacheClass type that has a 'redis' property which is a constructor function * that takes in any number of arguments and returns an instance of Redis. */ export type CacheClass = { redis: new (...args: any[]) => Redis; }; /** * Represents the base configuration for a cache, including host, username, password, and TLS settings. */ export type CacheBaseConfig = { hostname: string; username: string; port?: string | number; password?: string; enableTLS: boolean; clusterMode?: boolean; }; /** * Defines a CacheConfig type that extends CacheBaseConfig and includes a specific cache type. * @template S - The specific cache type to be included in the CacheConfig. * @extends CacheBaseConfig * @property {S} type - The specific cache type included in the CacheConfig. */ export type CacheConfig = CacheBaseConfig & { type: S; };