Skip to main content
Module

x/readable_stream/mod.ts>Writable

Node-core streams for userland
Latest
interface Writable
Re-export
import { type Writable } from "https://deno.land/x/readable_stream@v3.6.0-deno.0.3.0/mod.ts";

Properties

writable: boolean
writableEnded: boolean
writableFinished: boolean
writableHighWaterMark: number
writableLength: number
writableObjectMode: boolean
writableCorked: number
destroyed: boolean
WritableState: WritableState
_writableState: WritableState

Methods

new(options?: WritableOptions): Writable
_write(
chunk: any,
encoding: BufferEncoding,
callback: (error?: Error | null) => void,
): void
optional
_writev(chunks: Array<{ chunk: any; encoding: BufferEncoding; }>, callback: (error?: Error | null) => void): void
_destroy(error: Error | null, callback: (error?: Error | null) => void): void
_final(callback: (error?: Error | null) => void): void
write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean
write(
chunk: any,
encoding: BufferEncoding,
cb?: (error: Error | null | undefined) => void,
): boolean
setDefaultEncoding(encoding: BufferEncoding): this
end(cb?: () => void): void
end(chunk: any, cb?: () => void): void
end(
chunk: any,
encoding: BufferEncoding,
cb?: () => void,
): void
cork(): void
uncork(): void
destroy(error?: Error): void
addListener(event: "close", listener: () => void): this

Event emitter The defined events on documents including:

  1. close
  2. drain
  3. error
  4. finish
  5. pipe
  6. unpipe
addListener(event: "drain", listener: () => void): this
addListener(event: "error", listener: (err: Error) => void): this
addListener(event: "finish", listener: () => void): this
addListener(event: "pipe", listener: (src: Readable) => void): this
addListener(event: "unpipe", listener: (src: Readable) => void): this
addListener(event: string | symbol, listener: (...args: any[]) => void): this
emit(event: "close"): boolean
emit(event: "drain"): boolean
emit(event: "error", err: Error): boolean
emit(event: "finish"): boolean
emit(event: "pipe", src: Readable): boolean
emit(event: "unpipe", src: Readable): boolean
emit(event: string | symbol, ...args: any[]): boolean
on(event: "close", listener: () => void): this
on(event: "drain", listener: () => void): this
on(event: "error", listener: (err: Error) => void): this
on(event: "finish", listener: () => void): this
on(event: "pipe", listener: (src: Readable) => void): this
on(event: "unpipe", listener: (src: Readable) => void): this
on(event: string | symbol, listener: (...args: any[]) => void): this
once(event: "close", listener: () => void): this
once(event: "drain", listener: () => void): this
once(event: "error", listener: (err: Error) => void): this
once(event: "finish", listener: () => void): this
once(event: "pipe", listener: (src: Readable) => void): this
once(event: "unpipe", listener: (src: Readable) => void): this
once(event: string | symbol, listener: (...args: any[]) => void): this
prependListener(event: "close", listener: () => void): this
prependListener(event: "drain", listener: () => void): this
prependListener(event: "error", listener: (err: Error) => void): this
prependListener(event: "finish", listener: () => void): this
prependListener(event: "pipe", listener: (src: Readable) => void): this
prependListener(event: "unpipe", listener: (src: Readable) => void): this
prependListener(event: string | symbol, listener: (...args: any[]) => void): this
prependOnceListener(event: "close", listener: () => void): this
prependOnceListener(event: "drain", listener: () => void): this
prependOnceListener(event: "error", listener: (err: Error) => void): this
prependOnceListener(event: "finish", listener: () => void): this
prependOnceListener(event: "pipe", listener: (src: Readable) => void): this
prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this
removeListener(event: "close", listener: () => void): this
removeListener(event: "drain", listener: () => void): this
removeListener(event: "error", listener: (err: Error) => void): this
removeListener(event: "finish", listener: () => void): this
removeListener(event: "pipe", listener: (src: Readable) => void): this
removeListener(event: "unpipe", listener: (src: Readable) => void): this
removeListener(event: string | symbol, listener: (...args: any[]) => void): this
variable Writable
Re-export
import { Writable } from "https://deno.land/x/readable_stream@v3.6.0-deno.0.3.0/mod.ts";