import { type Writable } from "https://deno.land/x/proc@0.20.41/legacy/examples/deps.ts";
Simplified writable.
Methods
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.