You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
fix GET and GET_BUFFER return type
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { TransformArgumentsReply } from '.';
|
||||
import { transformReplyString } from './generic-transformers';
|
||||
import { transformReplyStringNull } from './generic-transformers';
|
||||
|
||||
export const FIRST_KEY_INDEX = 1;
|
||||
|
||||
@@ -9,4 +9,4 @@ export function transformArguments(key: string | Buffer): TransformArgumentsRepl
|
||||
return ['GET', key];
|
||||
}
|
||||
|
||||
export const transformReply = transformReplyString;
|
||||
export const transformReply = transformReplyStringNull;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { transformReplyBuffer } from './generic-transformers';
|
||||
import { transformReplyBufferNull } from './generic-transformers';
|
||||
|
||||
export { FIRST_KEY_INDEX, IS_READ_ONLY, transformArguments } from './GET';
|
||||
|
||||
export const BUFFER_MODE = true;
|
||||
|
||||
export const transformReply = transformReplyBuffer;
|
||||
export const transformReply = transformReplyBufferNull;
|
||||
|
@@ -20,10 +20,6 @@ export function transformReplyString(reply: string): string {
|
||||
return reply;
|
||||
}
|
||||
|
||||
export function transformReplyBuffer(reply: Buffer): Buffer {
|
||||
return reply;
|
||||
}
|
||||
|
||||
export function transformReplyStringNull(reply: string | null): string | null {
|
||||
return reply;
|
||||
}
|
||||
@@ -54,6 +50,10 @@ export function transformReplyBit(reply: BitValue): BitValue {
|
||||
return reply;
|
||||
}
|
||||
|
||||
export function transformReplyBufferNull(reply: Buffer | null): Buffer | null {
|
||||
return reply;
|
||||
}
|
||||
|
||||
export function transformReplyVoid(): void {}
|
||||
|
||||
export interface ScanOptions {
|
||||
|
Reference in New Issue
Block a user