From a0326f82e3b8f7e7ab0f36bdf934616a4351435a Mon Sep 17 00:00:00 2001 From: Daniel Herman Date: Wed, 25 Jan 2017 14:04:47 -0500 Subject: [PATCH] Add the `headers` property to the exported interface --- http-errors/http-errors-tests.ts | 1 + http-errors/index.d.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/http-errors/http-errors-tests.ts b/http-errors/http-errors-tests.ts index af06b3ebc6..e8c12126b4 100644 --- a/http-errors/http-errors-tests.ts +++ b/http-errors/http-errors-tests.ts @@ -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'); diff --git a/http-errors/index.d.ts b/http-errors/index.d.ts index e70d1d973c..176703f23f 100644 --- a/http-errors/index.d.ts +++ b/http-errors/index.d.ts @@ -11,6 +11,9 @@ declare module 'http-errors' { status: number; statusCode: number; expose: boolean; + headers?: { + [key: string]: string + }; } type HttpErrorConstructor = new(msg?: string) => HttpError;