diff --git a/types/http-errors/index.d.ts b/types/http-errors/index.d.ts index 90f8eeb13e..9969141091 100644 --- a/types/http-errors/index.d.ts +++ b/types/http-errors/index.d.ts @@ -20,9 +20,11 @@ declare namespace createHttpError { [key: string]: any; } + type UnknownError = Error | string | number | { [key: string]: any }; + type HttpErrorConstructor = new (msg?: string) => HttpError; - type CreateHttpError = (...args: Array) => HttpError; + type CreateHttpError = (...args: UnknownError[]) => HttpError; type NamedConstructors = { [code: string]: HttpErrorConstructor;