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

x/proc/tools/deps/proc.ts>Writable

A better way to work with processes in Deno.
Go to Latest
interface Writable
Re-export
import { type Writable } from "https://deno.land/x/proc@0.20.35/tools/deps/proc.ts";

Simplified writable.

Methods

getter
isClosed(): boolean

Indicates this is closed.

close(error?: Error): Promise<void>

Close the writable.

This must be called. The underlying resource will not be closed automatically.

Once closed, subsequent calls to write(...) will throw an error.

It is safe to call close() multiple times. Calls to close() after the first are a no-op.

If an error is passed on close(), it propagates forward.

The error (or undefined) passed on the first call to close() will be the one that is used. Error conditions passed on subsequent calls to close will be ignored.

write(item: T): Promise<void>

Write an item.