Solid · API
stream.destroy
Stops the stream permanently, at any point in the reply. Its listeners are removed, a later write has no effect, and a pending final() promise rejects. current() still returns the value from the time of the call.
z.object({ show: z.string(), night: z.string() })stream.on(() => { calls += 1 })
const end = stream.final()Stream destroyed mid-reply
{"show":"The Tempest",{
value: { show: 'The Tempest', night: '' },
listenerCalls: 2,
final: 'waiting',
}Runs in this page on the installed package. The input and the expected output are defined by the example.