From eea0a68199e5b8dc8bf940f69f39268e193df916 Mon Sep 17 00:00:00 2001 From: Vignesh Natarajan Date: Sat, 21 Feb 2026 20:05:25 -0800 Subject: [PATCH] chore: make tui callback invocation tsgo-safe --- src/tui/tui-command-handlers.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tui/tui-command-handlers.test.ts b/src/tui/tui-command-handlers.test.ts index 7ef0ae1fb..2fb1f4d57 100644 --- a/src/tui/tui-command-handlers.test.ts +++ b/src/tui/tui-command-handlers.test.ts @@ -46,10 +46,10 @@ describe("tui command handlers", () => { const renderOrders = requestRender.mock.invocationCallOrder; expect(renderOrders.some((order) => order > sendingOrder)).toBe(true); - if (!resolveSend) { + if (typeof resolveSend !== "function") { throw new Error("expected sendChat to be pending"); } - resolveSend({ runId: "r1" }); + (resolveSend as (value: { runId: string }) => void)({ runId: "r1" }); await pending; expect(setActivityStatus).toHaveBeenCalledWith("waiting"); });