mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 14:57:10 +00:00
Merge pull request #14245 from dcherman/http_errors_headers
[http-headers]: Add the `headers` property to the exported interface
This commit is contained in:
@@ -26,6 +26,7 @@ console.log(err.message);
|
||||
console.log(err.status);
|
||||
console.log(err.statusCode);
|
||||
console.log(err.expose);
|
||||
console.log(err.headers);
|
||||
|
||||
// createError(status, msg)
|
||||
var err = createError(404, 'LOL');
|
||||
|
||||
Vendored
+3
@@ -11,6 +11,9 @@ declare module 'http-errors' {
|
||||
status: number;
|
||||
statusCode: number;
|
||||
expose: boolean;
|
||||
headers?: {
|
||||
[key: string]: string
|
||||
};
|
||||
}
|
||||
|
||||
type HttpErrorConstructor = new(msg?: string) => HttpError;
|
||||
|
||||
Reference in New Issue
Block a user