Skip to content

Commit

Permalink
Update child_process.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
codershiba committed May 23, 2024
1 parent 22bd9a6 commit c907fec
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions types/node/test/child_process.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as childProcess from "node:child_process";
import * as dgram from "node:dgram";
import * as fs from "node:fs";
import * as net from "node:net";
import assert = require("node:assert");
Expand Down Expand Up @@ -338,7 +339,7 @@ async function testPromisify() {
});
cp = cp.addListener("message", (message, sendHandle) => {
const _message: any = message;
const _sendHandle: net.Socket | net.Server = sendHandle;
const _sendHandle: net.Socket | net.Server | dgram.Socket | undefined = sendHandle;
});
cp = cp.addListener("spawn", () => {
});
Expand All @@ -364,7 +365,7 @@ async function testPromisify() {
});
cp = cp.on("message", (message, sendHandle) => {
const _message: any = message;
const _sendHandle: net.Socket | net.Server = sendHandle;
const _sendHandle: net.Socket | net.Server | dgram.Socket | undefined = sendHandle;
});

cp = cp.once("close", (code, signal) => {
Expand All @@ -381,7 +382,7 @@ async function testPromisify() {
});
cp = cp.once("message", (message, sendHandle) => {
const _message: any = message;
const _sendHandle: net.Socket | net.Server = sendHandle;
const _sendHandle: net.Socket | net.Server | dgram.Socket | undefined = sendHandle;
});

cp = cp.prependListener("close", (code, signal) => {
Expand All @@ -398,7 +399,7 @@ async function testPromisify() {
});
cp = cp.prependListener("message", (message, sendHandle) => {
const _message: any = message;
const _sendHandle: net.Socket | net.Server = sendHandle;
const _sendHandle: net.Socket | net.Server | dgram.Socket | undefined = sendHandle;
});

cp = cp.prependOnceListener("close", (code, signal) => {
Expand All @@ -415,7 +416,7 @@ async function testPromisify() {
});
cp = cp.prependOnceListener("message", (message, sendHandle) => {
const _message: any = message;
const _sendHandle: net.Socket | net.Server = sendHandle;
const _sendHandle: net.Socket | net.Server | dgram.Socket | undefined = sendHandle;
});

_boolean = cp.kill();
Expand Down

0 comments on commit c907fec

Please sign in to comment.