Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

std/io/types.d.ts>WriterSync

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
interface WriterSync
import { type WriterSync } from "https://deno.land/std@0.125.0/io/types.d.ts";

Methods

writeSync(p: Uint8Array): number

Writes p.byteLength bytes from p to the underlying data stream. It returns the number of bytes written from p (0 <= n <= p.byteLength) and any error encountered that caused the write to stop early. writeSync() must throw a non-null error if it returns n < p.byteLength. writeSync() must not modify the slice data, even temporarily.

Implementations should not retain a reference to p.