How can I replace writeAllSync with the Streams API?

How would one best refactor the following code to use the Web Streams API as suggested by the deprecated stdlib streams module? I was hoping to not have to change this to async for now.

writeAllSync(Deno.stdout, this.encoder.encode(msg));
Was this page helpful?