You've already forked node-redis
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:
@@ -1,8 +1,9 @@
|
|||||||
|
import { TransformArgumentsReply } from '.';
|
||||||
import { BitValue, transformReplyBit } from './generic-transformers';
|
import { BitValue, transformReplyBit } from './generic-transformers';
|
||||||
|
|
||||||
export const FIRST_KEY_INDEX = 1;
|
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()];
|
return ['SETBIT', key, offset.toString(), value.toString()];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -743,9 +743,9 @@ export type TransformArgumentsReply = Array<string | Buffer> & { preserve?: unkn
|
|||||||
export interface RedisCommand {
|
export interface RedisCommand {
|
||||||
FIRST_KEY_INDEX?: number | ((...args: Array<any>) => string);
|
FIRST_KEY_INDEX?: number | ((...args: Array<any>) => string);
|
||||||
IS_READ_ONLY?: boolean;
|
IS_READ_ONLY?: boolean;
|
||||||
transformArguments(...args: Array<any>): TransformArgumentsReply;
|
transformArguments(this: void, zpte...args: Array<any>): TransformArgumentsReply;
|
||||||
BUFFER_MODE?: boolean;
|
BUFFER_MODE?: boolean;
|
||||||
transformReply(reply: RedisReply, preserved?: unknown): any;
|
transformReply(this: void, reply: RedisReply, preserved?: unknown): any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RedisCommands {
|
export interface RedisCommands {
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
import { strict as assert } from 'assert';
|
import { strict as assert } from 'assert';
|
||||||
import RedisClient, { RedisClientType } from './client';
|
import RedisClient, { RedisClientType } from './client';
|
||||||
import { RedisModules } from './commands';
|
|
||||||
import { RedisLuaScripts } from './lua-script';
|
|
||||||
import { execSync, spawn } from 'child_process';
|
import { execSync, spawn } from 'child_process';
|
||||||
import { once } from 'events';
|
import { once } from 'events';
|
||||||
import { RedisSocketOptions } from './socket';
|
import { RedisSocketOptions } from './socket';
|
||||||
|
Reference in New Issue
Block a user