mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-01-30 05:27:30 +00:00
Node: specify UnhandledRejectionListener reason param type
This commit is contained in:
parent
9ce154849c
commit
819e30f498
2
types/node/globals.d.ts
vendored
2
types/node/globals.d.ts
vendored
@ -692,7 +692,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;
|
||||
|
||||
@ -3317,7 +3317,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", () => { });
|
||||
|
||||
Loading…
Reference in New Issue
Block a user