You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-11 22:42:42 +03:00
update docs, add 6.0.x to the tests matrix, add eslint, npm update, fix some commands, fix some types
Co-authored-by: Simon Prickett <simon@crudworks.org>
This commit is contained in:
@@ -6,20 +6,20 @@ import { RedisCommandRawReply } from '../commands';
|
||||
export interface QueueCommandOptions {
|
||||
asap?: boolean;
|
||||
chainId?: symbol;
|
||||
signal?: any; // TODO: `AbortSignal` type is incorrect
|
||||
signal?: AbortSignal;
|
||||
}
|
||||
|
||||
interface CommandWaitingToBeSent extends CommandWaitingForReply {
|
||||
args: Array<string | Buffer>;
|
||||
chainId?: symbol;
|
||||
abort?: {
|
||||
signal: any; // TODO: `AbortSignal` type is incorrect
|
||||
signal: AbortSignal;
|
||||
listener(): void;
|
||||
};
|
||||
}
|
||||
|
||||
interface CommandWaitingForReply {
|
||||
resolve(reply?: any): void;
|
||||
resolve(reply?: unknown): void;
|
||||
reject(err: Error): void;
|
||||
channelsCounter?: number;
|
||||
bufferMode?: boolean;
|
||||
@@ -135,7 +135,8 @@ export default class RedisCommandsQueue {
|
||||
signal: options.signal,
|
||||
listener
|
||||
};
|
||||
options.signal.addEventListener('abort', listener, {
|
||||
// AbortSignal type is incorrent
|
||||
(options.signal as any).addEventListener('abort', listener, {
|
||||
once: true
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user