MCPcopy
hub / github.com/coder/mux / emit

Method emit

src/node/services/browser/BrowserControlService.test.ts:25–34  ·  view source on GitHub ↗
(event: string | symbol, ...args: unknown[])

Source from the content-addressed store, hash-verified

23 public signalCode: NodeJS.Signals | null = null;
24
25 override emit(event: string | symbol, ...args: unknown[]): boolean {
26 if (event === "close") {
27 this.exitCode = (args[0] as number | null | undefined) ?? null;
28 this.signalCode = (args[1] as NodeJS.Signals | null | undefined) ?? null;
29 }
30 if (event === "error") {
31 this.killed = true;
32 }
33 return super.emit(event, ...args);
34 }
35
36 writeStdout(chunk: string): void {
37 this.stdout.write(chunk);

Callers 2

closeMethod · 0.95
failMethod · 0.95

Calls 1

emitMethod · 0.65

Tested by

no test coverage detected