Solid · API

stream.close

Signals that no more input will arrive. The current value becomes the final value, even when the reply was cut short: final() resolves and every path is complete. A write after close() has no effect.

Schema
z.object({
  show: z.string(),
  night: z.string(),
  seats: z.array(z.string()),
  price_cents: z.number(),
  why: z.string(),
})
Truncated reply, then close()
Reply so far
{"show":"The Tempest","night":"2026-10-24",
final() and current value
{
  final: 'waiting',
  value: {
    show: 'The Tempest',
    night: '2026-10-24',
    seats: [],
    price_cents: 0,
    why: '',
  },
}
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.