diff --git a/http-errors/http-errors-tests.ts b/http-errors/http-errors-tests.ts index e8c12126b4..51017828a1 100644 --- a/http-errors/http-errors-tests.ts +++ b/http-errors/http-errors-tests.ts @@ -83,3 +83,4 @@ var err = new createError.MisdirectedRequest(); var err = new createError.MisdirectedRequest('Where should this go?'); let error: createError.HttpError; +console.log(error instanceof createError.HttpError); diff --git a/http-errors/index.d.ts b/http-errors/index.d.ts index 176703f23f..aff5b312dd 100644 --- a/http-errors/index.d.ts +++ b/http-errors/index.d.ts @@ -23,6 +23,8 @@ declare module 'http-errors' { [code: string]: new (msg?: string) => HttpError; (...args: Array): HttpError; + + HttpError: HttpErrorConstructor; Continue: HttpErrorConstructor; SwitchingProtocols: HttpErrorConstructor;