* remove catch-all variants for on/once/... in Process

* add "newListener" | "removeListener" variants
* correct emit() functions for "cluster"
* add some tests
This commit is contained in:
Flarna
2017-06-13 22:08:10 +02:00
parent 15e315003c
commit 5686653759
2 changed files with 38 additions and 28 deletions

View File

@@ -1892,6 +1892,17 @@ namespace process_tests {
}
{
process.on("message", (req: any) => { });
process.addListener("beforeExit", (code: number) => { });
process.once("disconnect", () => { });
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.once("warning", (warning: Error) => { });
process.prependListener("message", (message: any, sendHandle: any) => { });
process.prependOnceListener("SIGBREAK", () => { });
process.on("newListener", (event: string, listener: Function) => { });
process.once("removeListener", (event: string, listener: Function) => { });
}
}