Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions lib/Redis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@
* and may lose some pending replies that haven't written to client.
* If you want to wait for the pending replies, use Redis#quit instead.
*/
disconnect(reconnect = false) {

Check warning on line 384 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, custom-30445126297-debian)

Member disconnect should be declared before all private instance method definitions

Check warning on line 384 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, custom-30445126297-debian)

Member disconnect should be declared before all private instance method definitions

Check warning on line 384 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, rs-7.4.0-v1)

Member disconnect should be declared before all private instance method definitions

Check warning on line 384 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.2)

Member disconnect should be declared before all private instance method definitions

Check warning on line 384 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.4.0)

Member disconnect should be declared before all private instance method definitions

Check warning on line 384 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.4.0)

Member disconnect should be declared before all private instance method definitions

Check warning on line 384 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.4.0)

Member disconnect should be declared before all private instance method definitions

Check warning on line 384 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.8.0)

Member disconnect should be declared before all private instance method definitions

Check warning on line 384 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.4.0)

Member disconnect should be declared before all private instance method definitions

Check warning on line 384 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.8.0)

Member disconnect should be declared before all private instance method definitions

Check warning on line 384 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, custom-30445126297-debian)

Member disconnect should be declared before all private instance method definitions

Check warning on line 384 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.2)

Member disconnect should be declared before all private instance method definitions

Check warning on line 384 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.2)

Member disconnect should be declared before all private instance method definitions

Check warning on line 384 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, custom-30445126297-debian)

Member disconnect should be declared before all private instance method definitions

Check warning on line 384 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.2)

Member disconnect should be declared before all private instance method definitions

Check warning on line 384 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.8.0)

Member disconnect should be declared before all private instance method definitions

Check warning on line 384 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, rs-7.4.0-v1)

Member disconnect should be declared before all private instance method definitions

Check warning on line 384 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, rs-7.4.0-v1)

Member disconnect should be declared before all private instance method definitions

Check warning on line 384 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, rs-7.4.0-v1)

Member disconnect should be declared before all private instance method definitions

Check warning on line 384 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.8.0)

Member disconnect should be declared before all private instance method definitions
if (!reconnect) {
this.manuallyClosing = true;
}
Expand All @@ -401,7 +401,7 @@
*
* @deprecated
*/
end() {

Check warning on line 404 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, custom-30445126297-debian)

Member end should be declared before all private instance method definitions

Check warning on line 404 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, custom-30445126297-debian)

Member end should be declared before all private instance method definitions

Check warning on line 404 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, rs-7.4.0-v1)

Member end should be declared before all private instance method definitions

Check warning on line 404 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.2)

Member end should be declared before all private instance method definitions

Check warning on line 404 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.4.0)

Member end should be declared before all private instance method definitions

Check warning on line 404 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.4.0)

Member end should be declared before all private instance method definitions

Check warning on line 404 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.4.0)

Member end should be declared before all private instance method definitions

Check warning on line 404 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.8.0)

Member end should be declared before all private instance method definitions

Check warning on line 404 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.4.0)

Member end should be declared before all private instance method definitions

Check warning on line 404 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.8.0)

Member end should be declared before all private instance method definitions

Check warning on line 404 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, custom-30445126297-debian)

Member end should be declared before all private instance method definitions

Check warning on line 404 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.2)

Member end should be declared before all private instance method definitions

Check warning on line 404 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.2)

Member end should be declared before all private instance method definitions

Check warning on line 404 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, custom-30445126297-debian)

Member end should be declared before all private instance method definitions

Check warning on line 404 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.2)

Member end should be declared before all private instance method definitions

Check warning on line 404 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.8.0)

Member end should be declared before all private instance method definitions

Check warning on line 404 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, rs-7.4.0-v1)

Member end should be declared before all private instance method definitions

Check warning on line 404 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, rs-7.4.0-v1)

Member end should be declared before all private instance method definitions

Check warning on line 404 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, rs-7.4.0-v1)

Member end should be declared before all private instance method definitions

Check warning on line 404 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.8.0)

Member end should be declared before all private instance method definitions
this.disconnect();
}

Expand All @@ -414,7 +414,7 @@
* var anotherRedis = redis.duplicate();
* ```
*/
duplicate<Override extends Partial<RedisOptions> | undefined = undefined>(

Check warning on line 417 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, custom-30445126297-debian)

Member duplicate should be declared before all private instance method definitions

Check warning on line 417 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, custom-30445126297-debian)

Member duplicate should be declared before all private instance method definitions

Check warning on line 417 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, rs-7.4.0-v1)

Member duplicate should be declared before all private instance method definitions

Check warning on line 417 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.2)

Member duplicate should be declared before all private instance method definitions

Check warning on line 417 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.4.0)

Member duplicate should be declared before all private instance method definitions

Check warning on line 417 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.4.0)

Member duplicate should be declared before all private instance method definitions

Check warning on line 417 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.4.0)

Member duplicate should be declared before all private instance method definitions

Check warning on line 417 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.8.0)

Member duplicate should be declared before all private instance method definitions

Check warning on line 417 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.4.0)

Member duplicate should be declared before all private instance method definitions

Check warning on line 417 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.8.0)

Member duplicate should be declared before all private instance method definitions

Check warning on line 417 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, custom-30445126297-debian)

Member duplicate should be declared before all private instance method definitions

Check warning on line 417 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.2)

Member duplicate should be declared before all private instance method definitions

Check warning on line 417 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.2)

Member duplicate should be declared before all private instance method definitions

Check warning on line 417 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, custom-30445126297-debian)

Member duplicate should be declared before all private instance method definitions

Check warning on line 417 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.2)

Member duplicate should be declared before all private instance method definitions

Check warning on line 417 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.8.0)

Member duplicate should be declared before all private instance method definitions

Check warning on line 417 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, rs-7.4.0-v1)

Member duplicate should be declared before all private instance method definitions

Check warning on line 417 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, rs-7.4.0-v1)

Member duplicate should be declared before all private instance method definitions

Check warning on line 417 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, rs-7.4.0-v1)

Member duplicate should be declared before all private instance method definitions

Check warning on line 417 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.8.0)

Member duplicate should be declared before all private instance method definitions
override?: Override
): Redis<ReplyMappingFromOptions<ReplyMapping, Override>> {
return new Redis({
Expand Down Expand Up @@ -463,7 +463,7 @@
* });
* ```
*/
monitor(callback?: Callback<Redis>): Promise<Redis> {

Check warning on line 466 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, custom-30445126297-debian)

Member monitor should be declared before all private instance method definitions

Check warning on line 466 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, custom-30445126297-debian)

Member monitor should be declared before all private instance method definitions

Check warning on line 466 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, rs-7.4.0-v1)

Member monitor should be declared before all private instance method definitions

Check warning on line 466 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.2)

Member monitor should be declared before all private instance method definitions

Check warning on line 466 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.4.0)

Member monitor should be declared before all private instance method definitions

Check warning on line 466 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.4.0)

Member monitor should be declared before all private instance method definitions

Check warning on line 466 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.4.0)

Member monitor should be declared before all private instance method definitions

Check warning on line 466 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.8.0)

Member monitor should be declared before all private instance method definitions

Check warning on line 466 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.4.0)

Member monitor should be declared before all private instance method definitions

Check warning on line 466 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.8.0)

Member monitor should be declared before all private instance method definitions

Check warning on line 466 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, custom-30445126297-debian)

Member monitor should be declared before all private instance method definitions

Check warning on line 466 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.2)

Member monitor should be declared before all private instance method definitions

Check warning on line 466 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.2)

Member monitor should be declared before all private instance method definitions

Check warning on line 466 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, custom-30445126297-debian)

Member monitor should be declared before all private instance method definitions

Check warning on line 466 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.2)

Member monitor should be declared before all private instance method definitions

Check warning on line 466 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.8.0)

Member monitor should be declared before all private instance method definitions

Check warning on line 466 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, rs-7.4.0-v1)

Member monitor should be declared before all private instance method definitions

Check warning on line 466 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, rs-7.4.0-v1)

Member monitor should be declared before all private instance method definitions

Check warning on line 466 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, rs-7.4.0-v1)

Member monitor should be declared before all private instance method definitions

Check warning on line 466 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.8.0)

Member monitor should be declared before all private instance method definitions
const monitorInstance = this.duplicate({
monitor: true,
lazyConnect: false,
Expand Down Expand Up @@ -498,7 +498,7 @@
*
* @ignore
*/
sendCommand(command: Command, stream?: WriteableStream): unknown {

Check warning on line 501 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, custom-30445126297-debian)

Member sendCommand should be declared before all private instance method definitions

Check warning on line 501 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, custom-30445126297-debian)

Member sendCommand should be declared before all private instance method definitions

Check warning on line 501 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, rs-7.4.0-v1)

Member sendCommand should be declared before all private instance method definitions

Check warning on line 501 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.2)

Member sendCommand should be declared before all private instance method definitions

Check warning on line 501 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.4.0)

Member sendCommand should be declared before all private instance method definitions

Check warning on line 501 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.4.0)

Member sendCommand should be declared before all private instance method definitions

Check warning on line 501 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.4.0)

Member sendCommand should be declared before all private instance method definitions

Check warning on line 501 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.8.0)

Member sendCommand should be declared before all private instance method definitions

Check warning on line 501 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.4.0)

Member sendCommand should be declared before all private instance method definitions

Check warning on line 501 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.8.0)

Member sendCommand should be declared before all private instance method definitions

Check warning on line 501 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, custom-30445126297-debian)

Member sendCommand should be declared before all private instance method definitions

Check warning on line 501 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.2)

Member sendCommand should be declared before all private instance method definitions

Check warning on line 501 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.2)

Member sendCommand should be declared before all private instance method definitions

Check warning on line 501 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, custom-30445126297-debian)

Member sendCommand should be declared before all private instance method definitions

Check warning on line 501 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.2)

Member sendCommand should be declared before all private instance method definitions

Check warning on line 501 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.8.0)

Member sendCommand should be declared before all private instance method definitions

Check warning on line 501 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, rs-7.4.0-v1)

Member sendCommand should be declared before all private instance method definitions

Check warning on line 501 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, rs-7.4.0-v1)

Member sendCommand should be declared before all private instance method definitions

Check warning on line 501 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, rs-7.4.0-v1)

Member sendCommand should be declared before all private instance method definitions

Check warning on line 501 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.8.0)

Member sendCommand should be declared before all private instance method definitions
command.setReplyContext(this.condition ?? this.options);

if (this.status === "wait") {
Expand Down Expand Up @@ -741,23 +741,23 @@
});
}

scanStream(options?: ScanStreamOptions) {

Check warning on line 744 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, custom-30445126297-debian)

Member scanStream should be declared before all private instance method definitions

Check warning on line 744 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, custom-30445126297-debian)

Member scanStream should be declared before all private instance method definitions

Check warning on line 744 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, rs-7.4.0-v1)

Member scanStream should be declared before all private instance method definitions

Check warning on line 744 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.2)

Member scanStream should be declared before all private instance method definitions

Check warning on line 744 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.4.0)

Member scanStream should be declared before all private instance method definitions

Check warning on line 744 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.4.0)

Member scanStream should be declared before all private instance method definitions

Check warning on line 744 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.4.0)

Member scanStream should be declared before all private instance method definitions

Check warning on line 744 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.8.0)

Member scanStream should be declared before all private instance method definitions

Check warning on line 744 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.4.0)

Member scanStream should be declared before all private instance method definitions

Check warning on line 744 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.8.0)

Member scanStream should be declared before all private instance method definitions

Check warning on line 744 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, custom-30445126297-debian)

Member scanStream should be declared before all private instance method definitions

Check warning on line 744 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.2)

Member scanStream should be declared before all private instance method definitions

Check warning on line 744 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.2)

Member scanStream should be declared before all private instance method definitions

Check warning on line 744 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, custom-30445126297-debian)

Member scanStream should be declared before all private instance method definitions

Check warning on line 744 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.2)

Member scanStream should be declared before all private instance method definitions

Check warning on line 744 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.8.0)

Member scanStream should be declared before all private instance method definitions

Check warning on line 744 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, rs-7.4.0-v1)

Member scanStream should be declared before all private instance method definitions

Check warning on line 744 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, rs-7.4.0-v1)

Member scanStream should be declared before all private instance method definitions

Check warning on line 744 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, rs-7.4.0-v1)

Member scanStream should be declared before all private instance method definitions

Check warning on line 744 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.8.0)

Member scanStream should be declared before all private instance method definitions
return this.createScanStream("scan", { options });
}

scanBufferStream(options?: ScanStreamOptions) {

Check warning on line 748 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, custom-30445126297-debian)

Member scanBufferStream should be declared before all private instance method definitions

Check warning on line 748 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, custom-30445126297-debian)

Member scanBufferStream should be declared before all private instance method definitions

Check warning on line 748 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, rs-7.4.0-v1)

Member scanBufferStream should be declared before all private instance method definitions

Check warning on line 748 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.2)

Member scanBufferStream should be declared before all private instance method definitions

Check warning on line 748 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.4.0)

Member scanBufferStream should be declared before all private instance method definitions

Check warning on line 748 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.4.0)

Member scanBufferStream should be declared before all private instance method definitions

Check warning on line 748 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.4.0)

Member scanBufferStream should be declared before all private instance method definitions

Check warning on line 748 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.8.0)

Member scanBufferStream should be declared before all private instance method definitions

Check warning on line 748 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.4.0)

Member scanBufferStream should be declared before all private instance method definitions

Check warning on line 748 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.8.0)

Member scanBufferStream should be declared before all private instance method definitions

Check warning on line 748 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, custom-30445126297-debian)

Member scanBufferStream should be declared before all private instance method definitions

Check warning on line 748 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.2)

Member scanBufferStream should be declared before all private instance method definitions

Check warning on line 748 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.2)

Member scanBufferStream should be declared before all private instance method definitions

Check warning on line 748 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, custom-30445126297-debian)

Member scanBufferStream should be declared before all private instance method definitions

Check warning on line 748 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.2)

Member scanBufferStream should be declared before all private instance method definitions

Check warning on line 748 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.8.0)

Member scanBufferStream should be declared before all private instance method definitions

Check warning on line 748 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, rs-7.4.0-v1)

Member scanBufferStream should be declared before all private instance method definitions

Check warning on line 748 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, rs-7.4.0-v1)

Member scanBufferStream should be declared before all private instance method definitions

Check warning on line 748 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, rs-7.4.0-v1)

Member scanBufferStream should be declared before all private instance method definitions

Check warning on line 748 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.8.0)

Member scanBufferStream should be declared before all private instance method definitions
return this.createScanStream("scanBuffer", { options });
}

sscanStream(key: string, options?: ScanStreamOptions) {

Check warning on line 752 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, custom-30445126297-debian)

Member sscanStream should be declared before all private instance method definitions

Check warning on line 752 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, custom-30445126297-debian)

Member sscanStream should be declared before all private instance method definitions

Check warning on line 752 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, rs-7.4.0-v1)

Member sscanStream should be declared before all private instance method definitions

Check warning on line 752 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.2)

Member sscanStream should be declared before all private instance method definitions

Check warning on line 752 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.4.0)

Member sscanStream should be declared before all private instance method definitions

Check warning on line 752 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.4.0)

Member sscanStream should be declared before all private instance method definitions

Check warning on line 752 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.4.0)

Member sscanStream should be declared before all private instance method definitions

Check warning on line 752 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.8.0)

Member sscanStream should be declared before all private instance method definitions

Check warning on line 752 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.4.0)

Member sscanStream should be declared before all private instance method definitions

Check warning on line 752 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.8.0)

Member sscanStream should be declared before all private instance method definitions

Check warning on line 752 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, custom-30445126297-debian)

Member sscanStream should be declared before all private instance method definitions

Check warning on line 752 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.2)

Member sscanStream should be declared before all private instance method definitions

Check warning on line 752 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.2)

Member sscanStream should be declared before all private instance method definitions

Check warning on line 752 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, custom-30445126297-debian)

Member sscanStream should be declared before all private instance method definitions

Check warning on line 752 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.2)

Member sscanStream should be declared before all private instance method definitions

Check warning on line 752 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.8.0)

Member sscanStream should be declared before all private instance method definitions

Check warning on line 752 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, rs-7.4.0-v1)

Member sscanStream should be declared before all private instance method definitions

Check warning on line 752 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, rs-7.4.0-v1)

Member sscanStream should be declared before all private instance method definitions

Check warning on line 752 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, rs-7.4.0-v1)

Member sscanStream should be declared before all private instance method definitions

Check warning on line 752 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.8.0)

Member sscanStream should be declared before all private instance method definitions
return this.createScanStream("sscan", { key, options });
}

sscanBufferStream(key: string, options?: ScanStreamOptions) {

Check warning on line 756 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, custom-30445126297-debian)

Member sscanBufferStream should be declared before all private instance method definitions

Check warning on line 756 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, custom-30445126297-debian)

Member sscanBufferStream should be declared before all private instance method definitions

Check warning on line 756 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, rs-7.4.0-v1)

Member sscanBufferStream should be declared before all private instance method definitions

Check warning on line 756 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.2)

Member sscanBufferStream should be declared before all private instance method definitions

Check warning on line 756 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.4.0)

Member sscanBufferStream should be declared before all private instance method definitions

Check warning on line 756 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.4.0)

Member sscanBufferStream should be declared before all private instance method definitions

Check warning on line 756 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.4.0)

Member sscanBufferStream should be declared before all private instance method definitions

Check warning on line 756 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.8.0)

Member sscanBufferStream should be declared before all private instance method definitions

Check warning on line 756 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.4.0)

Member sscanBufferStream should be declared before all private instance method definitions

Check warning on line 756 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.8.0)

Member sscanBufferStream should be declared before all private instance method definitions

Check warning on line 756 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, custom-30445126297-debian)

Member sscanBufferStream should be declared before all private instance method definitions

Check warning on line 756 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.2)

Member sscanBufferStream should be declared before all private instance method definitions

Check warning on line 756 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.2)

Member sscanBufferStream should be declared before all private instance method definitions

Check warning on line 756 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, custom-30445126297-debian)

Member sscanBufferStream should be declared before all private instance method definitions

Check warning on line 756 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.2)

Member sscanBufferStream should be declared before all private instance method definitions

Check warning on line 756 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.8.0)

Member sscanBufferStream should be declared before all private instance method definitions

Check warning on line 756 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, rs-7.4.0-v1)

Member sscanBufferStream should be declared before all private instance method definitions

Check warning on line 756 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, rs-7.4.0-v1)

Member sscanBufferStream should be declared before all private instance method definitions

Check warning on line 756 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, rs-7.4.0-v1)

Member sscanBufferStream should be declared before all private instance method definitions

Check warning on line 756 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.8.0)

Member sscanBufferStream should be declared before all private instance method definitions
return this.createScanStream("sscanBuffer", { key, options });
}

hscanStream(key: string, options?: ScanStreamOptions) {

Check warning on line 760 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, custom-30445126297-debian)

Member hscanStream should be declared before all private instance method definitions

Check warning on line 760 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, custom-30445126297-debian)

Member hscanStream should be declared before all private instance method definitions

Check warning on line 760 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, rs-7.4.0-v1)

Member hscanStream should be declared before all private instance method definitions

Check warning on line 760 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.2)

Member hscanStream should be declared before all private instance method definitions

Check warning on line 760 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.4.0)

Member hscanStream should be declared before all private instance method definitions

Check warning on line 760 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.4.0)

Member hscanStream should be declared before all private instance method definitions

Check warning on line 760 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.4.0)

Member hscanStream should be declared before all private instance method definitions

Check warning on line 760 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, 8.8.0)

Member hscanStream should be declared before all private instance method definitions

Check warning on line 760 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.4.0)

Member hscanStream should be declared before all private instance method definitions

Check warning on line 760 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.8.0)

Member hscanStream should be declared before all private instance method definitions

Check warning on line 760 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (22.x, custom-30445126297-debian)

Member hscanStream should be declared before all private instance method definitions

Check warning on line 760 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.2)

Member hscanStream should be declared before all private instance method definitions

Check warning on line 760 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.2)

Member hscanStream should be declared before all private instance method definitions

Check warning on line 760 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, custom-30445126297-debian)

Member hscanStream should be declared before all private instance method definitions

Check warning on line 760 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, 8.2)

Member hscanStream should be declared before all private instance method definitions

Check warning on line 760 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, 8.8.0)

Member hscanStream should be declared before all private instance method definitions

Check warning on line 760 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (26.x, rs-7.4.0-v1)

Member hscanStream should be declared before all private instance method definitions

Check warning on line 760 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (20.x, rs-7.4.0-v1)

Member hscanStream should be declared before all private instance method definitions

Check warning on line 760 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, rs-7.4.0-v1)

Member hscanStream should be declared before all private instance method definitions

Check warning on line 760 in lib/Redis.ts

View workflow job for this annotation

GitHub Actions / test / test (24.x, 8.8.0)

Member hscanStream should be declared before all private instance method definitions
return this.createScanStream("hscan", { key, options });
}

Expand Down Expand Up @@ -1121,6 +1121,18 @@
cb: (pattern: string, channel: Buffer, message: Buffer) => void
): this;

on(event: "smessage", cb: (channel: string, message: string) => void): this;
once(event: "smessage", cb: (channel: string, message: string) => void): this;

on(
event: "smessageBuffer",
cb: (channel: Buffer, message: Buffer) => void
): this;
once(
event: "smessageBuffer",
cb: (channel: Buffer, message: Buffer) => void
): this;

on(event: "error", cb: (error: Error) => void): this;
once(event: "error", cb: (error: Error) => void): this;

Expand Down
20 changes: 20 additions & 0 deletions test/typing/events.test-.ts → test/typing/events.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,23 @@ redis.once("pmessageBuffer", (pattern, channel, message) => {
expectType<Buffer>(channel);
expectType<Buffer>(message);
});

redis.on("smessage", (channel, message) => {
expectType<string>(channel);
expectType<string>(message);
});

redis.on("smessageBuffer", (channel, message) => {
expectType<Buffer>(channel);
expectType<Buffer>(message);
});

redis.once("smessage", (channel, message) => {
expectType<string>(channel);
expectType<string>(message);
});

redis.once("smessageBuffer", (channel, message) => {
expectType<Buffer>(channel);
expectType<Buffer>(message);
});