Skip to main content
Module

x/proc/mod3.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.39/mod3.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.