From 3ff25a484ff2906568ec12c8a0834447386486d7 Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Sun, 9 Aug 2026 18:47:22 -0300 Subject: [PATCH] fix(stream): type empty-choice collector events --- open-sse/utils/streamEmptyChoices.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/open-sse/utils/streamEmptyChoices.ts b/open-sse/utils/streamEmptyChoices.ts index 20d2ec50e6..05f8d8e4b9 100644 --- a/open-sse/utils/streamEmptyChoices.ts +++ b/open-sse/utils/streamEmptyChoices.ts @@ -20,8 +20,15 @@ import { buildErrorBody } from "./error.ts"; import { buildStreamSummaryFromEvents } from "./streamPayloadCollector.ts"; +type StructuredSSEEventLike = { + index: number; + timestamp?: string; + event?: string; + data: unknown; +}; + type StructuredSSECollectorLike = { - getEvents: () => unknown[]; + getEvents: () => StructuredSSEEventLike[]; build: (summary?: unknown, opts?: { includeEvents?: boolean }) => unknown; };