@valkey/client
Version:
The source code and documentation for this package are in the main [node-redis](https://github.com/redis/node-redis) repo.
24 lines (23 loc) • 796 B
TypeScript
import { ValkeyCommandArgument, ValkeyCommandArguments } from ".";
export declare const FIRST_KEY_INDEX = 1;
type MaximumOneOf<T, K extends keyof T = keyof T> = K extends keyof T ? {
[P in K]?: T[K];
} & Partial<Record<Exclude<keyof T, K>, never>> : never;
type SetTTL = MaximumOneOf<{
EX: number;
PX: number;
EXAT: number;
PXAT: number;
KEEPTTL: true;
}>;
type SetGuards = MaximumOneOf<{
NX: true;
XX: true;
}>;
interface SetCommonOptions {
GET?: true;
}
export type SetOptions = SetTTL & SetGuards & SetCommonOptions;
export declare function transformArguments(key: ValkeyCommandArgument, value: ValkeyCommandArgument | number, options?: SetOptions): ValkeyCommandArguments;
export declare function transformReply(): ValkeyCommandArgument | null;
export {};