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

x/deno/cli/js/lib.deno_runtime.d.ts>__io.Writer

A modern runtime for JavaScript and TypeScript.
Go to Latest
interface __io.Writer
import { type __io } from "https://deno.land/x/deno@v0.30.0/cli/js/lib.deno_runtime.d.ts";
const { Writer } = __io;

Methods

write(p: Uint8Array): Promise<number>

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

Implementations must not retain p.