RLC: Remove NodeJS.ReadableStream from bytes request-body unions for browser-safe typings#3992
Draft
Copilot wants to merge 2 commits into
Draft
RLC: Remove NodeJS.ReadableStream from bytes request-body unions for browser-safe typings#3992Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Agent-Logs-Url: https://github.com/Azure/autorest.typescript/sessions/2adb414c-3c36-49bb-9665-00c57e6b3390 Co-authored-by: siddharth9606 <199754214+siddharth9606@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix browser build failure due to NodeJS.ReadableStream union
RLC: Remove NodeJS.ReadableStream from bytes request-body unions for browser-safe typings
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RLC currently emits
NodeJS.ReadableStreamin bytes request-body parameter unions, which breaks browser builds when@types/nodeis intentionally excluded (types: []). This change makes the emitted binary input type portable across browser and Node targets.Emitter typing update (RLC binary inputs)
packages/typespec-ts/src/utils/modelUtils.ts:... | NodeJS.ReadableStream... | AsyncIterable<Uint8Array>NodeJSnamespace in generatedparameters.ts.Unit expectation updates
packages/typespec-ts/test/unit/bytesGenerator.spec.tsto match the new emitted type.Representative emitted type change