Solid · API
stream.final
Returns a promise that resolves with the final value. On the root stream it resolves when the closing brace of the reply arrives. On a selected stream it resolves as soon as the value at that path is complete: in the example select('seats').final() resolves, and the seats can be used, while why is still streaming.
z.object({
show: z.string(),
night: z.string(),
seats: z.array(z.string()),
price_cents: z.number(),
why: z.string(),
})const seats = stream.select('seats').final()
const whole = stream.final()Stream, chunk by chunk
{"show":"The Tempest","night":"2026-10-24",
"seats":["C4","C5"]{ seats: 'waiting', whole: 'waiting' }Runs in this page on the installed package. The input and the expected output are defined by the example.