This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
outline/flow-typed/npm/http-errors_v1.x.x.js

61 lines
2.4 KiB
JavaScript

// flow-typed signature: 6ff0546e3438a4dd0c7cc8a4c32840d2
// flow-typed version: c6154227d1/http-errors_v1.x.x/flow_>=v0.104.x
declare module 'http-errors' {
declare class SpecialHttpError extends HttpError {
constructor(message?: string): SpecialHttpError;
}
declare class HttpError extends Error {
expose: bool;
message: string;
status: number;
statusCode: number;
}
declare module.exports: {
(status?: number, message?: string, props?: Object): HttpError,
HttpError: typeof HttpError,
BadRequest: typeof SpecialHttpError,
Unauthorized: typeof SpecialHttpError,
PaymentRequired: typeof SpecialHttpError,
Forbidden: typeof SpecialHttpError,
NotFound: typeof SpecialHttpError,
MethodNotAllowed: typeof SpecialHttpError,
NotAcceptable: typeof SpecialHttpError,
ProxyAuthenticationRequired: typeof SpecialHttpError,
RequestTimeout: typeof SpecialHttpError,
Conflict: typeof SpecialHttpError,
Gone: typeof SpecialHttpError,
LengthRequired: typeof SpecialHttpError,
PreconditionFailed: typeof SpecialHttpError,
PayloadTooLarge: typeof SpecialHttpError,
URITooLong: typeof SpecialHttpError,
UnsupportedMediaType: typeof SpecialHttpError,
RangeNotStatisfiable: typeof SpecialHttpError,
ExpectationFailed: typeof SpecialHttpError,
ImATeapot: typeof SpecialHttpError,
MisdirectedRequest: typeof SpecialHttpError,
UnprocessableEntity: typeof SpecialHttpError,
Locked: typeof SpecialHttpError,
FailedDependency: typeof SpecialHttpError,
UnorderedCollection: typeof SpecialHttpError,
UpgradeRequired: typeof SpecialHttpError,
PreconditionRequired: typeof SpecialHttpError,
TooManyRequests: typeof SpecialHttpError,
RequestHeaderFieldsTooLarge: typeof SpecialHttpError,
UnavailableForLegalReasons: typeof SpecialHttpError,
InternalServerError: typeof SpecialHttpError,
NotImplemented: typeof SpecialHttpError,
BadGateway: typeof SpecialHttpError,
ServiceUnavailable: typeof SpecialHttpError,
GatewayTimeout: typeof SpecialHttpError,
HTTPVersionNotSupported: typeof SpecialHttpError,
VariantAlsoNegotiates: typeof SpecialHttpError,
InsufficientStorage: typeof SpecialHttpError,
LoopDetected: typeof SpecialHttpError,
BandwidthLimitExceeded: typeof SpecialHttpError,
NotExtended: typeof SpecialHttpError,
NetworkAuthenticationRequired: typeof SpecialHttpError,
...
}
}