mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
http-errors: Add missing constructor
Allows the following to work:
```typescript
import { HttpError } from "http-errors";
let error: HttpError;
console.log(error instanceof HttpError);
```
This commit is contained in:
2
http-errors/index.d.ts
vendored
2
http-errors/index.d.ts
vendored
@@ -23,6 +23,8 @@ declare module 'http-errors' {
|
||||
[code: string]: new (msg?: string) => HttpError;
|
||||
|
||||
(...args: Array<Error | string | number | Object>): HttpError;
|
||||
|
||||
HttpError: HttpErrorConstructor;
|
||||
|
||||
Continue: HttpErrorConstructor;
|
||||
SwitchingProtocols: HttpErrorConstructor;
|
||||
|
||||
Reference in New Issue
Block a user