import { S3 } from "npm:@aws-sdk/client-s3@3.701.0";const s3 = new S3();const response = await s3.getObject({ Bucket: "mybucket", Key: "mykey" });const output = await Deno.open("out.dat", { write: true, create: true });const result = await response.Body.transformToWebStream().pipeTo(output.writable);
const result = await response.Body.transformToWebStream().pipeTo(outputWriter);
const result = await Readable.toWeb(response.Body).pipeTo(outputWriter);
Stack trace:TypeError: Failed to execute 'pipeTo' on 'ReadableStream': Argument 1 is not of type WritableStream at makeException (ext:deno_webidl/00_webidl.js:93:10) at Array.WritableStream (ext:deno_webidl/00_webidl.js:1120:13) at ReadableStream.pipeTo (ext:deno_web/06_streams.js:5303:39) at <anonymous>:13:52 at eventLoopTick (ext:core/01_core.js:175:7)