Merge pull request #33195 from OliverJAsh/oja/node/correct-unhandled-rejection-reason-param-4

Node: specify `UnhandledRejectionListener` `reason` param type
This commit is contained in:
Jesse Trinity
2019-03-01 17:45:10 -08:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -681,7 +681,7 @@ declare namespace NodeJS {
type ExitListener = (code: number) => void;
type RejectionHandledListener = (promise: Promise<any>) => void;
type UncaughtExceptionListener = (error: Error) => void;
type UnhandledRejectionListener = (reason: any, promise: Promise<any>) => void;
type UnhandledRejectionListener = (reason: {} | null | undefined, promise: Promise<any>) => void;
type WarningListener = (warning: Error) => void;
type MessageListener = (message: any, sendHandle: any) => void;
type SignalsListener = (signal: Signals) => void;
+1 -1
View File
@@ -1211,7 +1211,7 @@ import * as p from "process";
process.prependListener("exit", (code: number) => { });
process.prependOnceListener("rejectionHandled", (promise: Promise<any>) => { });
process.on("uncaughtException", (error: Error) => { });
process.addListener("unhandledRejection", (reason: any, promise: Promise<any>) => { });
process.addListener("unhandledRejection", (reason: {} | null | undefined, promise: Promise<any>) => { });
process.once("warning", (warning: Error) => { });
process.prependListener("message", (message: any, sendHandle: any) => { });
process.prependOnceListener("SIGBREAK", () => { });