Skip to content

Commit 5412479

Browse files
committed
better types
1 parent 0ab2245 commit 5412479

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

lib/commands/SETBIT.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
import { TransformArgumentsReply } from '.';
12
import { BitValue, transformReplyBit } from './generic-transformers';
23

34
export const FIRST_KEY_INDEX = 1;
45

5-
export function transformArguments(key: string, offset: number, value: BitValue) {
6+
export function transformArguments(key: string, offset: number, value: BitValue): TransformArgumentsReply {
67
return ['SETBIT', key, offset.toString(), value.toString()];
78
}
89

lib/commands/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,9 +743,9 @@ export type TransformArgumentsReply = Array<string | Buffer> & { preserve?: unkn
743743
export interface RedisCommand {
744744
FIRST_KEY_INDEX?: number | ((...args: Array<any>) => string);
745745
IS_READ_ONLY?: boolean;
746-
transformArguments(...args: Array<any>): TransformArgumentsReply;
746+
transformArguments(this: void, zpte...args: Array<any>): TransformArgumentsReply;
747747
BUFFER_MODE?: boolean;
748-
transformReply(reply: RedisReply, preserved?: unknown): any;
748+
transformReply(this: void, reply: RedisReply, preserved?: unknown): any;
749749
}
750750

751751
export interface RedisCommands {

lib/test-utils.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import { strict as assert } from 'assert';
22
import RedisClient, { RedisClientType } from './client';
3-
import { RedisModules } from './commands';
4-
import { RedisLuaScripts } from './lua-script';
53
import { execSync, spawn } from 'child_process';
64
import { once } from 'events';
75
import { RedisSocketOptions } from './socket';
@@ -370,4 +368,4 @@ export async function waitTillBeenCalled(spy: SinonSpy): Promise<void> {
370368

371369
await promiseTimeout(1);
372370
} while (spy.callCount === calls)
373-
}
371+
}

0 commit comments

Comments
 (0)