From 7f0dfbb8b84d397ac8a0b08586de2d30ad7b4699 Mon Sep 17 00:00:00 2001 From: m4air Date: Mon, 28 Sep 2026 04:58:45 -0700 Subject: [PATCH] Document the Node stream-pair typing gap --- src/main/wsl/wsl-daemon-connector-stream.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/wsl/wsl-daemon-connector-stream.ts b/src/main/wsl/wsl-daemon-connector-stream.ts index d9369e7ed36..d8ac01873ea 100644 --- a/src/main/wsl/wsl-daemon-connector-stream.ts +++ b/src/main/wsl/wsl-daemon-connector-stream.ts @@ -10,7 +10,9 @@ export function openWslDaemonConnectorStream( ): Promise { signal.throwIfAborted() const child = spawnProcess(spec) - const stream = Duplex.from({ readable: child.stdout, writable: child.stdin }) + const pair = { readable: child.stdout, writable: child.stdin } + // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: Node supports Node-stream pairs; current typings omit them. Byte/EOF tests cover this path. + const stream = Duplex.from(pair as unknown as Parameters[0]) // A child can fail before the awaiting protocol consumer has installed its listener. stream.on('error', () => {}) stream.once('close', () => child.kill())