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.8.1 to 1.8.2

135

http-errors/index.d.ts

@@ -15,5 +15,5 @@ // Type definitions for http-errors 1.8

declare namespace createHttpError {
interface HttpError extends Error {
status: number;
statusCode: number;
interface HttpError<N extends number = number> extends Error {
status: N;
statusCode: N;
expose: boolean;

@@ -28,5 +28,5 @@ headers?: {

type HttpErrorConstructor = new (msg?: string) => HttpError;
type HttpErrorConstructor<N extends number = number> = new (msg?: string) => HttpError<N>;
type CreateHttpError = (...args: UnknownError[]) => HttpError;
type CreateHttpError = <N extends UnknownError>(arg: N, ...rest: UnknownError[]) => HttpError<N extends number ? N : number>;

@@ -38,84 +38,45 @@ type IsHttpError = (error: unknown) => error is HttpError;

HttpError: HttpErrorConstructor;
} & 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>;
}
& Record<'BadRequest' | '400', HttpErrorConstructor<400>>
& Record<'Unauthorized' | '401', HttpErrorConstructor<401>>
& Record<'PaymentRequired' | '402', HttpErrorConstructor<402>>
& Record<'Forbidden' | '403', HttpErrorConstructor<403>>
& Record<'NotFound' | '404', HttpErrorConstructor<404>>
& Record<'MethodNotAllowed' | '405', HttpErrorConstructor<405>>
& Record<'NotAcceptable' | '406', HttpErrorConstructor<406>>
& Record<'ProxyAuthenticationRequired' | '407', HttpErrorConstructor<407>>
& Record<'RequestTimeout' | '408', HttpErrorConstructor<408>>
& Record<'Conflict' | '409', HttpErrorConstructor<409>>
& Record<'Gone' | '410', HttpErrorConstructor<410>>
& Record<'LengthRequired' | '411', HttpErrorConstructor<411>>
& Record<'PreconditionFailed' | '412', HttpErrorConstructor<412>>
& Record<'PayloadTooLarge' | '413', HttpErrorConstructor<413>>
& Record<'URITooLong' | '414', HttpErrorConstructor<414>>
& Record<'UnsupportedMediaType' | '415', HttpErrorConstructor<415>>
& Record<'RangeNotSatisfiable' | '416', HttpErrorConstructor<416>>
& Record<'ExpectationFailed' | '417', HttpErrorConstructor<417>>
& Record<'ImATeapot' | '418', HttpErrorConstructor<418>>
& Record<'MisdirectedRequest' | '421', HttpErrorConstructor<421>>
& Record<'UnprocessableEntity' | '422', HttpErrorConstructor<422>>
& Record<'Locked' | '423', HttpErrorConstructor<423>>
& Record<'FailedDependency' | '424', HttpErrorConstructor<424>>
& Record<'UnorderedCollection' | '425', HttpErrorConstructor<425>>
& Record<'UpgradeRequired' | '426', HttpErrorConstructor<426>>
& Record<'PreconditionRequired' | '428', HttpErrorConstructor<428>>
& Record<'TooManyRequests' | '429', HttpErrorConstructor<429>>
& Record<'RequestHeaderFieldsTooLarge' | '431', HttpErrorConstructor<431>>
& Record<'UnavailableForLegalReasons' | '451', HttpErrorConstructor<451>>
& Record<'InternalServerError' | '500', HttpErrorConstructor<500>>
& Record<'NotImplemented' | '501', HttpErrorConstructor<501>>
& Record<'BadGateway' | '502', HttpErrorConstructor<502>>
& Record<'ServiceUnavailable' | '503', HttpErrorConstructor<500>>
& Record<'GatewayTimeout' | '504', HttpErrorConstructor<504>>
& Record<'HTTPVersionNotSupported' | '505', HttpErrorConstructor<505>>
& Record<'VariantAlsoNegotiates' | '506', HttpErrorConstructor<506>>
& Record<'InsufficientStorage' | '507', HttpErrorConstructor<507>>
& Record<'LoopDetected' | '508', HttpErrorConstructor<508>>
& Record<'BandwidthLimitExceeded' | '509', HttpErrorConstructor<509>>
& Record<'NotExtended' | '510', HttpErrorConstructor<510>>
& Record<'NetworkAuthenticationRequire' | '511', HttpErrorConstructor<511>>
;
}
{
"name": "@types/http-errors",
"version": "1.8.1",
"version": "1.8.2",
"description": "TypeScript definitions for http-errors",

@@ -28,4 +28,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-errors",

"dependencies": {},
"typesPublisherContentHash": "b19a9052d35058a24569cde965e62a59db1ef8d456381598978c2d65370c634b",
"typeScriptVersion": "3.6"
"typesPublisherContentHash": "c2479b8b9d3c81b8d5e05a4e9af2847027b1274dadcdd92a5468f98c98449978",
"typeScriptVersion": "3.8"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Tue, 06 Jul 2021 21:33:36 GMT
* Last updated: Thu, 13 Jan 2022 20:01:39 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: none

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