1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-09 00:22:08 +03:00

better types

This commit is contained in:
leibale
2021-09-18 05:58:08 -04:00
parent 0ab2245049
commit 54124793ad
3 changed files with 5 additions and 6 deletions

View File

@@ -1,8 +1,9 @@
import { TransformArgumentsReply } from '.';
import { BitValue, transformReplyBit } from './generic-transformers';
export const FIRST_KEY_INDEX = 1;
export function transformArguments(key: string, offset: number, value: BitValue) {
export function transformArguments(key: string, offset: number, value: BitValue): TransformArgumentsReply {
return ['SETBIT', key, offset.toString(), value.toString()];
}

View File

@@ -743,9 +743,9 @@ export type TransformArgumentsReply = Array<string | Buffer> & { preserve?: unkn
export interface RedisCommand {
FIRST_KEY_INDEX?: number | ((...args: Array<any>) => string);
IS_READ_ONLY?: boolean;
transformArguments(...args: Array<any>): TransformArgumentsReply;
transformArguments(this: void, zpte...args: Array<any>): TransformArgumentsReply;
BUFFER_MODE?: boolean;
transformReply(reply: RedisReply, preserved?: unknown): any;
transformReply(this: void, reply: RedisReply, preserved?: unknown): any;
}
export interface RedisCommands {

View File

@@ -1,7 +1,5 @@
import { strict as assert } from 'assert';
import RedisClient, { RedisClientType } from './client';
import { RedisModules } from './commands';
import { RedisLuaScripts } from './lua-script';
import { execSync, spawn } from 'child_process';
import { once } from 'events';
import { RedisSocketOptions } from './socket';