mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
[http-errors] Extract UnknownError type (#40487)
* Extract UnknownError type * CS fix
This commit is contained in:
committed by
Sheetal Nandi
parent
39f15b3819
commit
8d33985d5a
Vendored
+3
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user