tupleson icon indicating copy to clipboard operation
tupleson copied to clipboard

feat: deserializeAsync parse takes a ReadableStream Uint8Array as input

Open Sheraff opened this issue 2 years ago • 0 comments

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 parse function: 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 stringify and pass it to parse (though stringify might also be changed to return a stream instead)

Sheraff avatar Oct 06 '23 13:10 Sheraff