Socket
Socket
Sign inDemoInstall

@types/http-errors

Package Overview
Dependencies
0
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.5.34 to 1.6.0

http-errors/LICENSE

189

http-errors/index.d.ts

@@ -1,97 +0,112 @@

// Type definitions for http-errors v1.5.0
// Type definitions for http-errors 1.6
// Project: https://github.com/jshttp/http-errors
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
// BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
declare module 'http-errors' {
namespace createHttpError {
export = createHttpError;
// See https://github.com/jshttp/http-errors/blob/1.3.1/index.js#L42
interface HttpError extends Error {
status: number;
statusCode: number;
expose: boolean;
headers?: {
[key: string]: string
};
}
declare const createHttpError: createHttpError.CreateHttpError & createHttpError.NamedConstructors;
type HttpErrorConstructor = new(msg?: string) => HttpError;
declare namespace createHttpError {
interface HttpError extends Error {
status: number;
statusCode: number;
expose: boolean;
headers?: {
[key: string]: string;
};
[key: string]: any;
}
interface CreateHttpError {
// See https://github.com/Microsoft/TypeScript/issues/227#issuecomment-50092674
[code: string]: new (msg?: string) => HttpError;
type HttpErrorConstructor = new (msg?: string) => HttpError;
(...args: Array<Error | string | number | Object>): HttpError;
HttpError: HttpErrorConstructor;
type CreateHttpError = (...args: Array<Error | string | number | { [key: string]: any }>) => HttpError;
Continue: HttpErrorConstructor;
SwitchingProtocols: HttpErrorConstructor;
Processing: HttpErrorConstructor;
OK: HttpErrorConstructor;
Created: HttpErrorConstructor;
Accepted: HttpErrorConstructor;
NonAuthoritativeInformation: HttpErrorConstructor;
NoContent: HttpErrorConstructor;
ResetContent: HttpErrorConstructor;
PartialContent: HttpErrorConstructor;
MultiStatus: HttpErrorConstructor;
AlreadyReported: HttpErrorConstructor;
IMUsed: HttpErrorConstructor;
MultipleChoices: HttpErrorConstructor;
MovedPermanently: HttpErrorConstructor;
Found: HttpErrorConstructor;
SeeOther: HttpErrorConstructor;
NotModified: HttpErrorConstructor;
UseProxy: HttpErrorConstructor;
Unused: HttpErrorConstructor;
TemporaryRedirect: HttpErrorConstructor;
PermanentRedirect: HttpErrorConstructor;
BadRequest: HttpErrorConstructor;
Unauthorized: HttpErrorConstructor;
PaymentRequired: HttpErrorConstructor;
Forbidden: HttpErrorConstructor;
NotFound: HttpErrorConstructor;
MethodNotAllowed: HttpErrorConstructor;
NotAcceptable: HttpErrorConstructor;
ProxyAuthenticationRequired: HttpErrorConstructor;
RequestTimeout: HttpErrorConstructor;
Conflict: HttpErrorConstructor;
Gone: HttpErrorConstructor;
LengthRequired: HttpErrorConstructor;
PreconditionFailed: HttpErrorConstructor;
PayloadTooLarge: HttpErrorConstructor;
URITooLong: HttpErrorConstructor;
UnsupportedMediaType: HttpErrorConstructor;
RangeNotSatisfiable: HttpErrorConstructor;
ExpectationFailed: HttpErrorConstructor;
ImATeapot: HttpErrorConstructor;
MisdirectedRequest: HttpErrorConstructor;
UnprocessableEntity: HttpErrorConstructor;
Locked: HttpErrorConstructor;
FailedDependency: HttpErrorConstructor;
UnorderedCollection: HttpErrorConstructor;
UpgradeRequired: HttpErrorConstructor;
PreconditionRequired: HttpErrorConstructor;
TooManyRequests: HttpErrorConstructor;
RequestHeaderFieldsTooLarge: HttpErrorConstructor;
UnavailableForLegalReasons: HttpErrorConstructor;
InternalServerError: HttpErrorConstructor;
NotImplemented: HttpErrorConstructor;
BadGateway: HttpErrorConstructor;
ServiceUnavailable: HttpErrorConstructor;
GatewayTimeout: HttpErrorConstructor;
HTTPVersionNotSupported: HttpErrorConstructor;
VariantAlsoNegotiates: HttpErrorConstructor;
InsufficientStorage: HttpErrorConstructor;
LoopDetected: HttpErrorConstructor;
BandwidthLimitExceeded: HttpErrorConstructor;
NotExtended: HttpErrorConstructor;
NetworkAuthenticationRequired: HttpErrorConstructor;
}
}
var createHttpError: createHttpError.CreateHttpError;
export = createHttpError;
type NamedConstructors = {
[code: string]: HttpErrorConstructor;
HttpError: new (msg?: string) => never;
} & Record<'BadRequest' |
'Unauthorized' |
'PaymentRequired' |
'Forbidden' |
'NotFound' |
'MethodNotAllowed' |
'NotAcceptable' |
'ProxyAuthenticationRequired' |
'RequestTimeout' |
'Conflict' |
'Gone' |
'LengthRequired' |
'PreconditionFailed' |
'PayloadTooLarge' |
'URITooLong' |
'UnsupportedMediaType' |
'RangeNotSatisfiable' |
'ExpectationFailed' |
'ImATeapot' |
'MisdirectedRequest' |
'UnprocessableEntity' |
'Locked' |
'FailedDependency' |
'UnorderedCollection' |
'UpgradeRequired' |
'PreconditionRequired' |
'TooManyRequests' |
'RequestHeaderFieldsTooLarge' |
'UnavailableForLegalReasons' |
'InternalServerError' |
'NotImplemented' |
'BadGateway' |
'ServiceUnavailable' |
'GatewayTimeout' |
'HTTPVersionNotSupported' |
'VariantAlsoNegotiates' |
'InsufficientStorage' |
'LoopDetected' |
'BandwidthLimitExceeded' |
'NotExtended' |
'NetworkAuthenticationRequire' |
'400' |
'401' |
'402' |
'403' |
'404' |
'405' |
'406' |
'407' |
'408' |
'409' |
'410' |
'411' |
'412' |
'413' |
'414' |
'415' |
'416' |
'417' |
'418' |
'421' |
'422' |
'423' |
'424' |
'425' |
'426' |
'428' |
'429' |
'431' |
'451' |
'500' |
'501' |
'502' |
'503' |
'504' |
'505' |
'506' |
'507' |
'508' |
'509' |
'510' |
'511', HttpErrorConstructor>;
}
{
"name": "@types/http-errors",
"version": "1.5.34",
"version": "1.6.0",
"description": "TypeScript definitions for http-errors",

@@ -10,2 +10,6 @@ "license": "MIT",

"url": "https://github.com/tkrotoff"
},
{
"name": "BendingBender",
"url": "https://github.com/BendingBender"
}

@@ -20,5 +24,4 @@ ],

"dependencies": {},
"peerDependencies": {},
"typesPublisherContentHash": "c1d1ed1b04f07a92373d156a59dc34609fc849c23d22ff68433a44c7a950f0e8",
"typeScriptVersion": "2.0"
"typesPublisherContentHash": "512e071ba3faa2c95cae65b2f9766a821489ab8810dc2cfcc51f2953a22e6743",
"typeScriptVersion": "2.3"
}

@@ -8,6 +8,6 @@ # Installation

# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/http-errors
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-errors
Additional Details
* Last updated: Wed, 15 Mar 2017 04:10:49 GMT
* Last updated: Wed, 16 Aug 2017 22:06:59 GMT
* Dependencies: none

@@ -17,2 +17,2 @@ * Global values: none

# Credits
These definitions were written by Tanguy Krotoff <https://github.com/tkrotoff>.
These definitions were written by Tanguy Krotoff <https://github.com/tkrotoff>, BendingBender <https://github.com/BendingBender>.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc