[http-errors] Extract UnknownError type (#40487)

* Extract UnknownError type

* CS fix
This commit is contained in:
Chris Wilkinson
2019-11-19 11:36:58 -08:00
committed by Sheetal Nandi
parent 39f15b3819
commit 8d33985d5a
+3 -1
View File
@@ -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<Error | string | number | { [key: string]: any }>) => HttpError;
type CreateHttpError = (...args: UnknownError[]) => HttpError;
type NamedConstructors = {
[code: string]: HttpErrorConstructor;