diff --git a/types/superagent/index.d.ts b/types/superagent/index.d.ts index 50c650135b..350b81f735 100644 --- a/types/superagent/index.d.ts +++ b/types/superagent/index.d.ts @@ -92,13 +92,20 @@ declare namespace request { response?: Response; } + interface HTTPError extends Error { + status: number; + text: string; + method: string; + path: string; + } + interface Response extends NodeJS.ReadableStream { accepted: boolean; badRequest: boolean; body: any; charset: string; clientError: boolean; - error: ResponseError; + error: false | HTTPError; files: any; forbidden: boolean; get(header: string): string;