Skip to content

Commit

Permalink
feat: Export MinimalChildProcess type (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcw authored Oct 31, 2024
1 parent 137ce2c commit 98dcb2c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/DenoHTTPWorker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface OnExitListener {
(exitCode: number, signal: string): void;
}

interface MinimalChildProcess {
export interface MinimalChildProcess {
stdout: Readable | null;
stderr: Readable | null;
readonly pid?: number | undefined;
Expand Down Expand Up @@ -204,7 +204,7 @@ export const newDenoHTTPWorker = async (
signal,
})
);
fs.rm(socketFile).catch(() => {});
fs.rm(socketFile).catch(() => { });
} else {
(worker as denoHTTPWorker)._terminate(code, signal);
}
Expand All @@ -223,7 +223,7 @@ export const newDenoHTTPWorker = async (
}

// Wait for the socket file to be created by the Deno process.
for (;;) {
for (; ;) {
if (exited) {
break;
}
Expand Down Expand Up @@ -311,7 +311,7 @@ class denoHTTPWorker {
forceKill(this.#process.pid!);
}
this.#agent.destroy();
fs.rm(this.#socketFile).catch(() => {});
fs.rm(this.#socketFile).catch(() => { });
for (const onexit of this.#onexitListeners) {
onexit(code ?? 1, signal ?? "");
}
Expand Down Expand Up @@ -365,7 +365,7 @@ class denoHTTPWorker {
{ agent: this.#agent, socketPath: this.#socketFile },
(resp) => {
resp.on("error", reject);
resp.on("data", () => {});
resp.on("data", () => { });
resp.on("close", () => {
resolve();
});
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export {
DenoHTTPWorker,
DenoWorkerOptions,
MinimalChildProcess,
newDenoHTTPWorker,
} from "./DenoHTTPWorker.js";

0 comments on commit 98dcb2c

Please sign in to comment.