1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-17 19:41:06 +03:00

fix some code analyzers (LGTM, deepsource, codeclimate) issues

This commit is contained in:
leibale
2021-06-28 20:19:13 -04:00
parent 2e9e7767d8
commit 33f8d5e484
22 changed files with 38 additions and 41 deletions

View File

@@ -1,4 +1,4 @@
import LinkedList, { Node } from 'yallist';
import LinkedList from 'yallist';
import RedisParser from 'redis-parser';
import { AbortError } from './errors';
import { RedisReply } from './commands';
@@ -208,7 +208,7 @@ export default class RedisCommandsQueue {
return this.#pushPubSubCommand(command, channelsToSubscribe);
}
unsubscribe(command: PubSubUnsubscribeCommands, channels?: string | Array<string>, listener?: PubSubListener) {
unsubscribe(command: PubSubUnsubscribeCommands, channels?: string | Array<string>, listener?: PubSubListener): Promise<void> {
const listeners = command === PubSubUnsubscribeCommands.UNSUBSCRIBE ? this.#pubSubListeners.channels : this.#pubSubListeners.patterns;
if (!channels) {
listeners.clear();