Skip to content

Commit 08c9072

Browse files
committed
fix: add missing declaration for callBuffer
1 parent 6942cec commit 08c9072

File tree

7 files changed

+240
-575
lines changed

7 files changed

+240
-575
lines changed

Diff for: bin/generateRedisCommander/template.ts

+19
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,25 @@ interface RedisCommander<Context extends ClientContext = { type: "default" }> {
5050
call(
5151
...args: [command: string, ...args: (string | Buffer | number)[]]
5252
): Result<unknown, Context>;
53+
callBuffer(
54+
command: string,
55+
callback?: Callback<unknown>
56+
): Result<unknown, Context>;
57+
callBuffer(
58+
command: string,
59+
args: (string | Buffer | number)[],
60+
callback?: Callback<unknown>
61+
): Result<unknown, Context>;
62+
callBuffer(
63+
...args: [
64+
command: string,
65+
...args: (string | Buffer | number)[],
66+
callback: Callback<unknown>
67+
]
68+
): Result<unknown, Context>;
69+
callBuffer(
70+
...args: [command: string, ...args: (string | Buffer | number)[]]
71+
): Result<unknown, Context>;
5372

5473
////
5574
}

Diff for: lib/utils/Commander.ts

-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ commands.forEach(function (commandName) {
111111
});
112112

113113
Commander.prototype.call = generateFunction("call", "utf8");
114-
// @ts-expect-error
115114
Commander.prototype.callBuffer = generateFunction("callBuffer", null);
116115
// @ts-expect-error
117116
Commander.prototype.send_command = Commander.prototype.call;

Diff for: lib/utils/RedisCommander.ts

+19
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,25 @@ interface RedisCommander<Context extends ClientContext = { type: "default" }> {
5050
call(
5151
...args: [command: string, ...args: (string | Buffer | number)[]]
5252
): Result<unknown, Context>;
53+
callBuffer(
54+
command: string,
55+
callback?: Callback<unknown>
56+
): Result<unknown, Context>;
57+
callBuffer(
58+
command: string,
59+
args: (string | Buffer | number)[],
60+
callback?: Callback<unknown>
61+
): Result<unknown, Context>;
62+
callBuffer(
63+
...args: [
64+
command: string,
65+
...args: (string | Buffer | number)[],
66+
callback: Callback<unknown>
67+
]
68+
): Result<unknown, Context>;
69+
callBuffer(
70+
...args: [command: string, ...args: (string | Buffer | number)[]]
71+
): Result<unknown, Context>;
5372

5473
/**
5574
* List the ACL categories or the commands inside a category

0 commit comments

Comments
 (0)