Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WriteStream

Hierarchy

  • WriteStream
    • WriteStream

Index

Properties

Readonly bufferSize

bufferSize: number

Readonly bytesRead

bytesRead: number

Readonly bytesWritten

bytesWritten: number

columns

columns: number

Readonly connecting

connecting: boolean

Readonly destroyed

destroyed: boolean

isTTY

isTTY: boolean

Readonly localAddress

localAddress: string

Readonly localPort

localPort: number

readable

readable: boolean

Readonly readableHighWaterMark

readableHighWaterMark: number

Readonly readableLength

readableLength: number

Readonly readableObjectMode

readableObjectMode: boolean

Optional Readonly remoteAddress

remoteAddress: undefined | string

Optional Readonly remoteFamily

remoteFamily: undefined | string

Optional Readonly remotePort

remotePort: undefined | number

rows

rows: number

Readonly writable

writable: boolean

Readonly writableCorked

writableCorked: number

Readonly writableEnded

writableEnded: boolean

Readonly writableFinished

writableFinished: boolean

Readonly writableHighWaterMark

writableHighWaterMark: number

Readonly writableLength

writableLength: number

Readonly writableObjectMode

writableObjectMode: boolean

Methods

[Symbol.asyncIterator]

  • [Symbol.asyncIterator](): AsyncIterableIterator<any>
  • Returns AsyncIterableIterator<any>

_destroy

  • _destroy(error: null | Error, callback: (error: null | Error) => void): void
  • Parameters

    • error: null | Error
    • callback: (error: null | Error) => void
        • (error: null | Error): void
        • Parameters

          • error: null | Error

          Returns void

    Returns void

_final

  • _final(callback: (error?: null | Error) => void): void
  • Parameters

    • callback: (error?: null | Error) => void
        • (error?: null | Error): void
        • Parameters

          • Optional error: null | Error

          Returns void

    Returns void

_read

  • _read(size: number): void
  • Parameters

    • size: number

    Returns void

_write

  • _write(chunk: any, encoding: string, callback: (error?: null | Error) => void): void
  • Parameters

    • chunk: any
    • encoding: string
    • callback: (error?: null | Error) => void
        • (error?: null | Error): void
        • Parameters

          • Optional error: null | Error

          Returns void

    Returns void

Optional _writev

_writev:

addListener

  • addListener(event: string, listener: (...args: any[]) => void): WriteStream
  • addListener(event: "resize", listener: () => void): WriteStream
  • Parameters

    • event: string
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns WriteStream

  • Parameters

    • event: "resize"
    • listener: () => void
        • (): void
        • Returns void

    Returns WriteStream

address

  • address(): string | AddressInfo
  • Returns string | AddressInfo

clearLine

  • clearLine(dir: Direction, callback?: () => void): boolean
  • Clears the current line of this WriteStream in a direction identified by dir.

    Parameters

    • dir: Direction
    • Optional callback: () => void
        • (): void
        • Returns void

    Returns boolean

clearScreenDown

  • clearScreenDown(callback?: () => void): boolean
  • Clears this WriteStream from the current cursor down.

    Parameters

    • Optional callback: () => void
        • (): void
        • Returns void

    Returns boolean

connect

  • connect(options: SocketConnectOpts, connectionListener?: () => void): WriteStream
  • connect(port: number, host: string, connectionListener?: () => void): WriteStream
  • connect(port: number, connectionListener?: () => void): WriteStream
  • connect(path: string, connectionListener?: () => void): WriteStream
  • Parameters

    • options: SocketConnectOpts
    • Optional connectionListener: () => void
        • (): void
        • Returns void

    Returns WriteStream

  • Parameters

    • port: number
    • host: string
    • Optional connectionListener: () => void
        • (): void
        • Returns void

    Returns WriteStream

  • Parameters

    • port: number
    • Optional connectionListener: () => void
        • (): void
        • Returns void

    Returns WriteStream

  • Parameters

    • path: string
    • Optional connectionListener: () => void
        • (): void
        • Returns void

    Returns WriteStream

cork

  • cork(): void
  • Returns void

cursorTo

  • cursorTo(x: number, y?: number, callback?: () => void): boolean
  • cursorTo(x: number, callback: () => void): boolean
  • Moves this WriteStream's cursor to the specified position.

    Parameters

    • x: number
    • Optional y: number
    • Optional callback: () => void
        • (): void
        • Returns void

    Returns boolean

  • Parameters

    • x: number
    • callback: () => void
        • (): void
        • Returns void

    Returns boolean

destroy

  • destroy(error?: Error): void
  • Parameters

    • Optional error: Error

    Returns void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • emit(event: "resize"): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

  • Parameters

    • event: "resize"

    Returns boolean

end

  • end(cb?: () => void): void
  • end(buffer: string | Uint8Array, cb?: () => void): void
  • end(str: string | Uint8Array, encoding?: string, cb?: () => void): void
  • Parameters

    • Optional cb: () => void
        • (): void
        • Returns void

    Returns void

  • Parameters

    • buffer: string | Uint8Array
    • Optional cb: () => void
        • (): void
        • Returns void

    Returns void

  • Parameters

    • str: string | Uint8Array
    • Optional encoding: string
    • Optional cb: () => void
        • (): void
        • Returns void

    Returns void

eventNames

  • eventNames(): (string | symbol)[]
  • Returns (string | symbol)[]

getColorDepth

  • getColorDepth(env?: {}): number
  • default

    process.env

    Parameters

    • Optional env: {}

    Returns number

getMaxListeners

  • getMaxListeners(): number
  • Returns number

getWindowSize

  • getWindowSize(): [number, number]
  • Returns [number, number]

hasColors

  • hasColors(depth?: number): boolean
  • hasColors(env?: {}): boolean
  • hasColors(depth: number, env?: {}): boolean
  • Parameters

    • Optional depth: number

    Returns boolean

  • Parameters

    • Optional env: {}

    Returns boolean

  • Parameters

    • depth: number
    • Optional env: {}

    Returns boolean

isPaused

  • isPaused(): boolean
  • Returns boolean

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

moveCursor

  • moveCursor(dx: number, dy: number, callback?: () => void): boolean
  • Moves this WriteStream's cursor relative to its current position.

    Parameters

    • dx: number
    • dy: number
    • Optional callback: () => void
        • (): void
        • Returns void

    Returns boolean

off

  • off(event: string | symbol, listener: (...args: any[]) => void): WriteStream
  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns WriteStream

on

  • on(event: string, listener: (...args: any[]) => void): WriteStream
  • on(event: "resize", listener: () => void): WriteStream
  • Parameters

    • event: string
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns WriteStream

  • Parameters

    • event: "resize"
    • listener: () => void
        • (): void
        • Returns void

    Returns WriteStream

once

  • once(event: string, listener: (...args: any[]) => void): WriteStream
  • once(event: "resize", listener: () => void): WriteStream
  • Parameters

    • event: string
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns WriteStream

  • Parameters

    • event: "resize"
    • listener: () => void
        • (): void
        • Returns void

    Returns WriteStream

pause

  • Returns WriteStream

pipe

  • pipe<T>(destination: T, options?: { end?: undefined | boolean }): T
  • Type parameters

    Parameters

    • destination: T
    • Optional options: { end?: undefined | boolean }
      • Optional end?: undefined | boolean

    Returns T

prependListener

  • prependListener(event: string, listener: (...args: any[]) => void): WriteStream
  • prependListener(event: "resize", listener: () => void): WriteStream
  • Parameters

    • event: string
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns WriteStream

  • Parameters

    • event: "resize"
    • listener: () => void
        • (): void
        • Returns void

    Returns WriteStream

prependOnceListener

  • prependOnceListener(event: string, listener: (...args: any[]) => void): WriteStream
  • prependOnceListener(event: "resize", listener: () => void): WriteStream
  • Parameters

    • event: string
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns WriteStream

  • Parameters

    • event: "resize"
    • listener: () => void
        • (): void
        • Returns void

    Returns WriteStream

push

  • push(chunk: any, encoding?: string): boolean
  • Parameters

    • chunk: any
    • Optional encoding: string

    Returns boolean

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

read

  • read(size?: number): any
  • Parameters

    • Optional size: number

    Returns any

ref

  • Returns WriteStream

removeAllListeners

  • removeAllListeners(event?: string | symbol): WriteStream
  • Parameters

    • Optional event: string | symbol

    Returns WriteStream

removeListener

  • removeListener(event: "close", listener: () => void): WriteStream
  • removeListener(event: "data", listener: (chunk: any) => void): WriteStream
  • removeListener(event: "end", listener: () => void): WriteStream
  • removeListener(event: "readable", listener: () => void): WriteStream
  • removeListener(event: "error", listener: (err: Error) => void): WriteStream
  • removeListener(event: string | symbol, listener: (...args: any[]) => void): WriteStream
  • Parameters

    • event: "close"
    • listener: () => void
        • (): void
        • Returns void

    Returns WriteStream

  • Parameters

    • event: "data"
    • listener: (chunk: any) => void
        • (chunk: any): void
        • Parameters

          • chunk: any

          Returns void

    Returns WriteStream

  • Parameters

    • event: "end"
    • listener: () => void
        • (): void
        • Returns void

    Returns WriteStream

  • Parameters

    • event: "readable"
    • listener: () => void
        • (): void
        • Returns void

    Returns WriteStream

  • Parameters

    • event: "error"
    • listener: (err: Error) => void
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns WriteStream

  • Parameters

    • event: string | symbol
    • listener: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns WriteStream

resume

  • Returns WriteStream

setDefaultEncoding

  • Parameters

    • encoding: string

    Returns WriteStream

setEncoding

  • Parameters

    • Optional encoding: string

    Returns WriteStream

setKeepAlive

  • setKeepAlive(enable?: boolean, initialDelay?: number): WriteStream
  • Parameters

    • Optional enable: boolean
    • Optional initialDelay: number

    Returns WriteStream

setMaxListeners

  • Parameters

    • n: number

    Returns WriteStream

setNoDelay

  • Parameters

    • Optional noDelay: boolean

    Returns WriteStream

setTimeout

  • setTimeout(timeout: number, callback?: () => void): WriteStream
  • Parameters

    • timeout: number
    • Optional callback: () => void
        • (): void
        • Returns void

    Returns WriteStream

uncork

  • uncork(): void
  • Returns void

unpipe

unref

  • Returns WriteStream

unshift

  • unshift(chunk: any, encoding?: "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex"): void
  • Parameters

    • chunk: any
    • Optional encoding: "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex"

    Returns void

wrap

write

  • write(buffer: string | Uint8Array, cb?: (err?: Error) => void): boolean
  • write(str: string | Uint8Array, encoding?: string, cb?: (err?: Error) => void): boolean
  • Parameters

    • buffer: string | Uint8Array
    • Optional cb: (err?: Error) => void
        • (err?: Error): void
        • Parameters

          • Optional err: Error

          Returns void

    Returns boolean

  • Parameters

    • str: string | Uint8Array
    • Optional encoding: string
    • Optional cb: (err?: Error) => void
        • (err?: Error): void
        • Parameters

          • Optional err: Error

          Returns void

    Returns boolean

Generated using TypeDoc