tupleson
tupleson copied to clipboard
feat: deserializeAsync parse takes a ReadableStream Uint8Array as input
The goal is to better propagate streaming errors, which happens natively if we use the Response.body stream (might also in the future propagate backpressure).
This has pretty important drawbacks
- much more opinionated
parsefunction: takes a stream and not any iterator - types are lost going through the stream because we're forcing encoding as UInt8Array (this would happen normally through the network though, it's just an issue in the tests I think)
- we can't just take the output of
stringifyand pass it toparse(though stringify might also be changed to return a stream instead)