body of ModelClient.asBrowserStream wrongly typed as ReadableStream #32954
Labels
Azure.Core
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
@azure-rest/ai-inference
1.0.0-beta.5
v.18.17.1
^5.5.3
Describe the bug
I wished to pipe the body to
TextDecoderStream
toEventSourceParserStream
, but it turned out thatres.body
isn'tReadableStream
sobody.pipeThrough(new TextDecoderStream())
fails at runtime.However in TypeScript it's wrongly declared as
ReadableStream
sobody.pipeThrough(new TextDecoderStream())
didn't raise any error.Upon inspecting the inheritance chain, the body is in fact
IncomingMessage -> Readable -> Stream -> EventEmitter -> Object
.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Screenshots
Additional context
The inheritance is inspected with:
The text was updated successfully, but these errors were encountered: