Skip to content

Commit f64457f

Browse files
chore(streaming): tighten stream test types
1 parent 2628f0b commit f64457f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

apps/sim/lib/workflows/streaming/streaming.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,7 @@ describe('createStreamingResponse agent-events-v1', () => {
14491449
selectedOutputs: ['agent-1_answer'],
14501450
},
14511451
executeFn: async ({ onStream }) => {
1452-
let sink: { onEvent: (event: unknown) => void | Promise<void> } | undefined
1452+
let sink: AgentStreamSink | undefined
14531453
const onStreamPromise = onStream({
14541454
blockId: 'agent-1',
14551455
stream: new ReadableStream<Uint8Array>({
@@ -1459,7 +1459,7 @@ describe('createStreamingResponse agent-events-v1', () => {
14591459
},
14601460
}),
14611461
streamFormat: 'text',
1462-
subscribe: (nextSink: { onEvent: (event: unknown) => void | Promise<void> }) => {
1462+
subscribe: (nextSink) => {
14631463
sink = nextSink
14641464
return () => {}
14651465
},
@@ -1472,7 +1472,7 @@ describe('createStreamingResponse agent-events-v1', () => {
14721472
logs: [],
14731473
metadata: {},
14741474
},
1475-
} as any)
1475+
})
14761476

14771477
await sink?.onEvent({ type: 'text_delta', text: 'Live ', turn: 'pending' })
14781478
await sink?.onEvent({ type: 'text_delta', text: 'answer', turn: 'pending' })
@@ -1483,7 +1483,7 @@ describe('createStreamingResponse agent-events-v1', () => {
14831483
success: true,
14841484
output: { answer: 'Live answer' },
14851485
logs: [],
1486-
} as any
1486+
}
14871487
},
14881488
})
14891489

0 commit comments

Comments
 (0)