mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-06 08:23:19 +08:00
After a fetch body's handle gained its web view, a read, cancel or pipe started on the view left Response.bodyUsed false until the view's pull reached the body, where Node's bodyUsed reads the stream's disturbed state at once. bodyUsed now also answers the view's disturbed state, which the web streams' bridge reports (ScrWebStreamBridge.disturbed). A program that names none of the web stream classes linked them only for member accesses the checker resolves to ReadableStream, so body.tee() or for await over a body inside a function whose parameters have no type threw a TypeError. The same member names on an untyped receiver, and for await over an untyped value, now link the classes in a program that links the fetch unit. Adds corpus program fetch-body-web-stream-helpers.mjs, with its corpus cost and preflight/order baseline, and bodyUsed cases to fetch-body-web-stream-linked.mjs.