Open
Description
It seems the definition of RedisStore at
https://github.com/dabroek/node-cache-manager-redis-store/blob/master/dist/index.d.ts
is not compatible with the definition of Store at
https://github.com/node-cache-manager/node-cache-manager/blob/master/src/caching.ts
the methods set(), get(), keys(), reset() and ttl() have an incompatible function definitions
interface RedisStore extends Store {
name: string;
getClient: () => RedisClientType;
isCacheableValue: any;
set: (key: any, value: any, options: any, cb: any) => Promise<any>;
get: (key: any, options: any, cb: any) => Promise<any>;
del: (...args: any[]) => Promise<any>;
mset: (...args: any[]) => Promise<any>;
mget: (...args: any[]) => Promise<any>;
mdel: (...args: any[]) => Promise<any>;
reset: (cb: any) => Promise<any>;
keys: (pattern: string, cb: any) => Promise<any>;
ttl: (key: any, cb: any) => Promise<any>;
}
export type Store = {
get<T>(key: string): Promise<T | undefined>;
set<T>(key: string, data: T, ttl?: Ttl): Promise<void>;
del(key: string): Promise<void>;
reset(): Promise<void>;
mset(args: [string, unknown][], ttl?: Ttl): Promise<void>;
mget(...args: string[]): Promise<unknown[]>;
mdel(...args: string[]): Promise<void>;
keys(pattern?: string): Promise<string[]>;
ttl(key: string): Promise<number>;
};
Metadata
Metadata
Assignees
Labels
No labels