You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
17 lines
441 B
TypeScript
17 lines
441 B
TypeScript
import { RedisCommandArgument, RedisCommandArguments } from '.';
|
|
|
|
export interface AuthOptions {
|
|
username?: RedisCommandArgument;
|
|
password: RedisCommandArgument;
|
|
}
|
|
|
|
export function transformArguments({ username, password }: AuthOptions): RedisCommandArguments {
|
|
if (!username) {
|
|
return ['AUTH', password];
|
|
}
|
|
|
|
return ['AUTH', username, password];
|
|
}
|
|
|
|
export declare function transformReply(): RedisCommandArgument;
|