mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
More accurate Redis Error types (#43916)
Co-authored-by: David Stephens <david.2.stephens@bt.com>
This commit is contained in:
11
types/redis/index.d.ts
vendored
11
types/redis/index.d.ts
vendored
@@ -1248,12 +1248,17 @@ export function createClient(options?: ClientOpts): RedisClient;
|
||||
|
||||
export function print(err: Error | null, reply: any): void;
|
||||
|
||||
export class RedisError extends Error {
|
||||
export class RedisError extends Error { }
|
||||
export class ReplyError extends RedisError {
|
||||
command: string;
|
||||
args?: any[];
|
||||
code: string;
|
||||
}
|
||||
export class AbortError extends RedisError {
|
||||
command: string;
|
||||
args?: any[];
|
||||
code?: string;
|
||||
}
|
||||
export class ReplyError extends RedisError { }
|
||||
export class AbortError extends RedisError { }
|
||||
export class ParserError extends RedisError {
|
||||
offset: number;
|
||||
buffer: Buffer;
|
||||
|
||||
11
types/redis/ts3.1/index.d.ts
vendored
11
types/redis/ts3.1/index.d.ts
vendored
@@ -1231,11 +1231,18 @@ export function createClient(options?: ClientOpts): RedisClient;
|
||||
export function print(err: Error | null, reply: any): void;
|
||||
|
||||
export class RedisError extends Error {
|
||||
name: string;
|
||||
}
|
||||
export class ReplyError extends RedisError {
|
||||
command: string;
|
||||
args?: unknown[];
|
||||
code: string;
|
||||
}
|
||||
export class AbortError extends RedisError {
|
||||
command: string;
|
||||
args?: unknown[];
|
||||
code?: string;
|
||||
}
|
||||
export class ReplyError extends RedisError { }
|
||||
export class AbortError extends RedisError { }
|
||||
export class ParserError extends RedisError {
|
||||
offset: number;
|
||||
buffer: Buffer;
|
||||
|
||||
Reference in New Issue
Block a user