Go to Latest
class default
extends Stream
import { default } from "https://dotland.deno.dev/std@0.110.0/node/_stream/writable.ts";

A bit simpler than readable streams. Implement an async ._write(chunk, encoding, cb), and it'll handle all the drain event emission and buffering.

Constructors

new
default(options?: WritableOptions)

Properties

optional
_final: (this: Writable, callback: (error?: Error | null | undefined) => void) => void
_writableState: WritableState
optional
_writev: writeV | null
destroyed
writable
readonly
writableBuffer
readonly
writableCorked
readonly
writableEnded
readonly
writableFinished
readonly
writableHighWaterMark
readonly
writableLength
readonly
writableObjectMode

Methods

_destroy(err: Error | null, cb: (error?: Error | null) => void)
_write(
chunk: any,
encoding: string,
cb: (error?: Error | null) => void,
): void
destroy(err?: Error | null, cb?: () => void)
end(cb?: () => void): void
end(chunk: any, cb?: () => void): void
end(
chunk: any,
encoding: WritableEncodings,
cb?: () => void,
): void
end(
x?: any | (() => void),
y?: WritableEncodings | (() => void),
z?: () => void,
)
pipe(dest: Writable): Writable
setDefaultEncoding(encoding: string)
write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean
write(
chunk: any,
encoding: WritableEncodings | null,
cb?: (error: Error | null | undefined) => void,
): boolean
write(
chunk: any,
x?: WritableEncodings | null | ((error: Error | null | undefined) => void),
y?: ((error: Error | null | undefined) => void),
)

Static Properties

WritableState