Skip to main content
Deno.stdout.writeSync - Deno documentation
method Deno.stdout.writeSync
stdout.writeSync(p: Uint8Array): number

Synchronously write the contents of the array buffer (p) to stdout.

Returns the number of bytes written.

It is not guaranteed that the full buffer will be written in a single call.

const encoder = new TextEncoder();
const data = encoder.encode("Hello world");
const bytesWritten = Deno.stdout.writeSync(data); // 11

Parameters

p: Uint8Array

Return Type

number