1 | import rp = require('.');
|
2 | import http = require('http');
|
3 |
|
4 | export interface RequestError extends Error {
|
5 | name: 'RequestError';
|
6 | cause: any;
|
7 | error: any;
|
8 | options: rp.Options;
|
9 | response: http.IncomingMessage;
|
10 | }
|
11 | export interface RequestErrorConstructor {
|
12 | new (cause: any, options: rp.Options, response: http.IncomingMessage): RequestError;
|
13 | (cause: any, options: rp.Options, response: http.IncomingMessage): RequestError;
|
14 | prototype: RequestError;
|
15 | }
|
16 | export const RequestError: RequestErrorConstructor;
|
17 |
|
18 | export interface StatusCodeError extends Error {
|
19 | name: 'StatusCodeError';
|
20 | statusCode: number;
|
21 | error: any;
|
22 | options: rp.Options;
|
23 | response: http.IncomingMessage;
|
24 | }
|
25 | export interface StatusCodeErrorConstructor extends Error {
|
26 | new (statusCode: number, body: any, options: rp.Options, response: http.IncomingMessage): StatusCodeError;
|
27 | (statusCode: number, body: any, options: rp.Options, response: http.IncomingMessage): StatusCodeError;
|
28 | prototype: StatusCodeError;
|
29 | }
|
30 | export const StatusCodeError: StatusCodeErrorConstructor;
|
31 |
|
32 | export interface TransformError extends Error {
|
33 | name: 'TransformError';
|
34 | cause: any;
|
35 | error: any;
|
36 | options: rp.Options;
|
37 | response: http.IncomingMessage;
|
38 | }
|
39 | export interface TransformErrorConstructor extends Error {
|
40 | new (cause: any, options: rp.Options, response: http.IncomingMessage): TransformError;
|
41 | (cause: any, options: rp.Options, response: http.IncomingMessage): TransformError;
|
42 | prototype: TransformError;
|
43 | }
|
44 | export const TransformError: TransformErrorConstructor;
|