You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-09 00:22:08 +03:00
ref #1653 - better types
This commit is contained in:
@@ -8,7 +8,7 @@ describe('GEOSEARCHSTORE', () => {
|
||||
describe('transformArguments', () => {
|
||||
it('simple', () => {
|
||||
assert.deepEqual(
|
||||
transformArguments('destination', 'source', 'member', {
|
||||
transformArguments('destination', '/home/leibale/Workspace/node-redis/lib/commands/GEOSEARCHSTORE.spec.tssource', 'member', {
|
||||
radius: 1,
|
||||
unit: 'm'
|
||||
}, {
|
||||
|
@@ -1,3 +1,4 @@
|
||||
import { TransformArgumentsReply } from '.';
|
||||
import { transformEXAT, transformPXAT, transformReplyStringNull } from './generic-transformers';
|
||||
|
||||
export const FIRST_KEY_INDEX = 1;
|
||||
@@ -14,7 +15,7 @@ type GetExModes = {
|
||||
PERSIST: true;
|
||||
};
|
||||
|
||||
export function transformArguments(key: string, mode: GetExModes) {
|
||||
export function transformArguments(key: string, mode: GetExModes): TransformArgumentsReply {
|
||||
const args = ['GETEX', key];
|
||||
|
||||
if ('EX' in mode) {
|
||||
|
@@ -753,7 +753,10 @@ export interface RedisCommands {
|
||||
}
|
||||
|
||||
export interface RedisModule {
|
||||
[key: string]: RedisCommand;
|
||||
[command: string]: RedisCommand;
|
||||
}
|
||||
|
||||
export type RedisModules = Record<string, RedisModule>;
|
||||
export interface RedisModules {
|
||||
[module: string]: RedisModule;
|
||||
}
|
||||
// export type RedisModules = Record<string, RedisModule>;
|
||||
|
Reference in New Issue
Block a user