### Hierarchy

- Socket
  - WriteStream

### Implements

- ReadableStream
- Writable

## Index

### Constructors

- constructor

### Properties

- bufferSize
- bytesRead
- bytesWritten
- columns
- connecting
- destroyed
- isTTY
- localAddress
- localPort
- readable
- readableHighWaterMark
- readableLength
- remoteAddress
- remoteFamily
- remotePort
- rows
- writable
- writableHighWaterMark
- writableLength
- defaultMaxListeners

### Methods

- __@asyncIterator
- _destroy
- _final
- _read
- _write
- _writev
- addListener
- address
- clearLine
- clearScreenDown
- connect
- cork
- cursorTo
- destroy
- emit
- end
- eventNames
- getColorDepth
- getMaxListeners
- getWindowSize
- isPaused
- listenerCount
- listeners
- off
- on
- once
- pause
- pipe
- prependListener
- prependOnceListener
- push
- rawListeners
- read
- ref
- removeAllListeners
- removeListener
- resume
- setDefaultEncoding
- setEncoding
- setKeepAlive
- setMaxListeners
- setNoDelay
- setTimeout
- uncork
- unpipe
- unref
- unshift
- wrap
- write
- listenerCount

## Constructors

### constructor

- new WriteStream(options?: SocketConstructorOpts): WriteStream

- Inherited from Socket.constructor

  Overrides Duplex.constructor

  - Defined in node_modules/@types/node/net.d.ts:37

  #### Parameters

  - ##### Optional options: SocketConstructorOpts

  #### Returns WriteStream

## Properties

### bufferSize

bufferSize: number

Inherited from Socket.bufferSize

- Defined in node_modules/@types/node/net.d.ts:59

### bytesRead

bytesRead: number

Inherited from Socket.bytesRead

- Defined in node_modules/@types/node/net.d.ts:60

### bytesWritten

bytesWritten: number

Inherited from Socket.bytesWritten

- Defined in node_modules/@types/node/net.d.ts:61

### columns

columns: number

- Defined in node_modules/@types/node/tty.d.ts:43

### connecting

connecting: boolean

Inherited from Socket.connecting

- Defined in node_modules/@types/node/net.d.ts:62

### destroyed

destroyed: boolean

Inherited from Socket.destroyed

- Defined in node_modules/@types/node/net.d.ts:63

### isTTY

isTTY: boolean

- Defined in node_modules/@types/node/tty.d.ts:45

### localAddress

localAddress: string

Inherited from Socket.localAddress

- Defined in node_modules/@types/node/net.d.ts:64

### localPort

localPort: number

Inherited from Socket.localPort

- Defined in node_modules/@types/node/net.d.ts:65

### readable

readable: boolean

Implementation of ReadableStream.readable

Inherited from Readable.readable

- Defined in node_modules/@types/node/stream.d.ts:20

### readableHighWaterMark

readableHighWaterMark: number

Inherited from Readable.readableHighWaterMark

- Defined in node_modules/@types/node/stream.d.ts:21

### readableLength

readableLength: number

Inherited from Readable.readableLength

- Defined in node_modules/@types/node/stream.d.ts:22

### Optional remoteAddress

remoteAddress: undefined | string

Inherited from Socket.remoteAddress

- Defined in node_modules/@types/node/net.d.ts:66

### Optional remoteFamily

remoteFamily: undefined | string

Inherited from Socket.remoteFamily

- Defined in node_modules/@types/node/net.d.ts:67

### Optional remotePort

remotePort: undefined | number

Inherited from Socket.remotePort

- Defined in node_modules/@types/node/net.d.ts:68

### rows

rows: number

- Defined in node_modules/@types/node/tty.d.ts:44

### writable

writable: boolean

Inherited from Duplex.writable

- Defined in node_modules/@types/node/stream.d.ts:207

### writableHighWaterMark

writableHighWaterMark: number

Inherited from Duplex.writableHighWaterMark

- Defined in node_modules/@types/node/stream.d.ts:208

### writableLength

writableLength: number

Inherited from Duplex.writableLength

- Defined in node_modules/@types/node/stream.d.ts:209

### Static defaultMaxListeners

defaultMaxListeners: number

Inherited from EventEmitter.defaultMaxListeners

- Defined in node_modules/@types/node/events.d.ts:8

## Methods

### __@asyncIterator

- __@asyncIterator(): AsyncIterableIterator<any>

- Implementation of ReadableStream.__@asyncIterator

  Inherited from Readable.__@asyncIterator

  - Defined in node_modules/@types/node/stream.d.ts:95

  #### Returns AsyncIterableIterator<any>

### _destroy

- _destroy(error: Error | null, callback: function): void

- Inherited from Duplex._destroy

  Overrides Readable._destroy

  - Defined in node_modules/@types/node/stream.d.ts:213

  #### Parameters

  - ##### error: Error | null

  - ##### callback: function

    - - (error: Error | null): void

      - #### Parameters

        - ##### error: Error | null

        #### Returns void

### _final

- _final(callback: function): void

- Inherited from Duplex._final

  - Defined in node_modules/@types/node/stream.d.ts:214

  #### Parameters

  - ##### callback: function

    - - (error?: Error | null): void

      - #### Parameters

        - ##### Optional error: Error | null

        #### Returns void

### _read

- _read(size: number): void

- Inherited from Readable._read

  - Defined in node_modules/@types/node/stream.d.ts:24

  #### Parameters

  - ##### size: number

  #### Returns void

### _write

- _write(chunk: any, encoding: string, callback: function): void

- Inherited from Duplex._write

  - Defined in node_modules/@types/node/stream.d.ts:211

  #### Parameters

  - ##### chunk: any

  - ##### encoding: string

  - ##### callback: function

    - - (error?: Error | null): void

      - #### Parameters

        - ##### Optional error: Error | null

        #### Returns void

### Optional _writev

- _writev(chunks: Array<object>, callback: function): void

- Inherited from Duplex._writev

  - Defined in node_modules/@types/node/stream.d.ts:212

  #### Parameters

  - ##### chunks: Array<object>

  - ##### callback: function

    - - (error?: Error | null): void

      - #### Parameters

        - ##### Optional error: Error | null

        #### Returns void

### addListener

- addListener(event: string, listener: function): this
- addListener(event: "resize", listener: function): this

- Overrides Socket.addListener

  - Defined in node_modules/@types/node/tty.d.ts:17

  #### Parameters

  - ##### event: string

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

- Overrides Socket.addListener

  - Defined in node_modules/@types/node/tty.d.ts:18

  #### Parameters

  - ##### event: "resize"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

### address

- address(): AddressInfo | string

- Inherited from Socket.address

  - Defined in node_modules/@types/node/net.d.ts:55

  #### Returns AddressInfo | string

### clearLine

- clearLine(dir: Direction): void

- - Defined in node_modules/@types/node/tty.d.ts:35

  #### Parameters

  - ##### dir: Direction

  #### Returns void

### clearScreenDown

- clearScreenDown(): void

- - Defined in node_modules/@types/node/tty.d.ts:36

  #### Returns void

### connect

- connect(options: SocketConnectOpts, connectionListener?: undefined | function): this
- connect(port: number, host: string, connectionListener?: undefined | function): this
- connect(port: number, connectionListener?: undefined | function): this
- connect(path: string, connectionListener?: undefined | function): this

- Inherited from Socket.connect

  - Defined in node_modules/@types/node/net.d.ts:44

  #### Parameters

  - ##### options: SocketConnectOpts

  - ##### Optional connectionListener: undefined | function

  #### Returns this

- Inherited from Socket.connect

  - Defined in node_modules/@types/node/net.d.ts:45

  #### Parameters

  - ##### port: number

  - ##### host: string

  - ##### Optional connectionListener: undefined | function

  #### Returns this

- Inherited from Socket.connect

  - Defined in node_modules/@types/node/net.d.ts:46

  #### Parameters

  - ##### port: number

  - ##### Optional connectionListener: undefined | function

  #### Returns this

- Inherited from Socket.connect

  - Defined in node_modules/@types/node/net.d.ts:47

  #### Parameters

  - ##### path: string

  - ##### Optional connectionListener: undefined | function

  #### Returns this

### cork

- cork(): void

- Inherited from Duplex.cork

  - Defined in node_modules/@types/node/stream.d.ts:221

  #### Returns void

### cursorTo

- cursorTo(x: number, y: number): void

- - Defined in node_modules/@types/node/tty.d.ts:37

  #### Parameters

  - ##### x: number

  - ##### y: number

  #### Returns void

### destroy

- destroy(error?: Error): void

- Inherited from Readable.destroy

  - Defined in node_modules/@types/node/stream.d.ts:35

  #### Parameters

  - ##### Optional error: Error

  #### Returns void

### emit

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

- Implementation of ReadableStream.emit

  Overrides Socket.emit

  - Defined in node_modules/@types/node/tty.d.ts:20

  #### Parameters

  - ##### event: string | symbol

  - ##### Rest ...args: any[]

  #### Returns boolean

- Overrides Socket.emit

  - Defined in node_modules/@types/node/tty.d.ts:21

  #### Parameters

  - ##### event: "resize"

  #### Returns boolean

### end

- end(cb?: undefined | function): void
- end(buffer: Buffer | Uint8Array | string, cb?: undefined | function): void
- end(str: Buffer | Uint8Array | string, encoding?: undefined | string, cb?: undefined | function): void

- Inherited from Socket.end

  Overrides Duplex.end

  - Defined in node_modules/@types/node/net.d.ts:71

  #### Parameters

  - ##### Optional cb: undefined | function

  #### Returns void

- Inherited from Socket.end

  Overrides Duplex.end

  - Defined in node_modules/@types/node/net.d.ts:72

  #### Parameters

  - ##### buffer: Buffer | Uint8Array | string

  - ##### Optional cb: undefined | function

  #### Returns void

- Inherited from Socket.end

  Overrides Duplex.end

  - Defined in node_modules/@types/node/net.d.ts:73

  #### Parameters

  - ##### str: Buffer | Uint8Array | string

  - ##### Optional encoding: undefined | string

  - ##### Optional cb: undefined | function

  #### Returns void

### eventNames

- eventNames(): Array<string | symbol>

- Implementation of ReadableStream.eventNames

  Inherited from EventEmitter.eventNames

  Overrides EventEmitter.eventNames

  - Defined in node_modules/@types/node/events.d.ts:23

  #### Returns Array<string | symbol>

### getColorDepth

- getColorDepth(env?: undefined | __type): number

- - Defined in node_modules/@types/node/tty.d.ts:41
  default

    `process.env`

  #### Parameters

  - ##### Optional env: undefined | __type

  #### Returns number

### getMaxListeners

- getMaxListeners(): number

- Implementation of ReadableStream.getMaxListeners

  Inherited from EventEmitter.getMaxListeners

  Overrides EventEmitter.getMaxListeners

  - Defined in node_modules/@types/node/events.d.ts:19

  #### Returns number

### getWindowSize

- getWindowSize(): [number, number]

- - Defined in node_modules/@types/node/tty.d.ts:42

  #### Returns [number, number]

### isPaused

- isPaused(): boolean

- Implementation of ReadableStream.isPaused

  Inherited from Readable.isPaused

  - Defined in node_modules/@types/node/stream.d.ts:29

  #### Returns boolean

### listenerCount

- listenerCount(type: string | symbol): number

- Implementation of ReadableStream.listenerCount

  Inherited from EventEmitter.listenerCount

  Overrides EventEmitter.listenerCount

  - Defined in node_modules/@types/node/events.d.ts:24

  #### Parameters

  - ##### type: string | symbol

  #### Returns number

### listeners

- listeners(event: string | symbol): Function[]

- Implementation of ReadableStream.listeners

  Inherited from EventEmitter.listeners

  Overrides EventEmitter.listeners

  - Defined in node_modules/@types/node/events.d.ts:20

  #### Parameters

  - ##### event: string | symbol

  #### Returns Function[]

### off

- off(event: string | symbol, listener: function): this

- Inherited from EventEmitter.off

  Overrides EventEmitter.off

  - Defined in node_modules/@types/node/events.d.ts:16

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

### on

- on(event: string, listener: function): this
- on(event: "resize", listener: function): this

- Overrides Socket.on

  - Defined in node_modules/@types/node/tty.d.ts:23

  #### Parameters

  - ##### event: string

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

- Overrides Socket.on

  - Defined in node_modules/@types/node/tty.d.ts:24

  #### Parameters

  - ##### event: "resize"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

### once

- once(event: string, listener: function): this
- once(event: "resize", listener: function): this

- Overrides Socket.once

  - Defined in node_modules/@types/node/tty.d.ts:26

  #### Parameters

  - ##### event: string

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

- Overrides Socket.once

  - Defined in node_modules/@types/node/tty.d.ts:27

  #### Parameters

  - ##### event: "resize"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

### pause

- pause(): this

- Implementation of ReadableStream.pause

  Inherited from Socket.pause

  Overrides Readable.pause

  - Defined in node_modules/@types/node/net.d.ts:50

  #### Returns this

### pipe

- pipe<T>(destination: T, options?: undefined | object): T

- Inherited from internal.pipe

  - Defined in node_modules/@types/node/stream.d.ts:5

  #### Type parameters

  - #### T: WritableStream

  #### Parameters

  - ##### destination: T

  - ##### Optional options: undefined | object

  #### Returns T

### prependListener

- prependListener(event: string, listener: function): this
- prependListener(event: "resize", listener: function): this

- Overrides Socket.prependListener

  - Defined in node_modules/@types/node/tty.d.ts:29

  #### Parameters

  - ##### event: string

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

- Overrides Socket.prependListener

  - Defined in node_modules/@types/node/tty.d.ts:30

  #### Parameters

  - ##### event: "resize"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

### prependOnceListener

- prependOnceListener(event: string, listener: function): this
- prependOnceListener(event: "resize", listener: function): this

- Overrides Socket.prependOnceListener

  - Defined in node_modules/@types/node/tty.d.ts:32

  #### Parameters

  - ##### event: string

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

- Overrides Socket.prependOnceListener

  - Defined in node_modules/@types/node/tty.d.ts:33

  #### Parameters

  - ##### event: "resize"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

### push

- push(chunk: any, encoding?: undefined | string): boolean

- Inherited from Readable.push

  - Defined in node_modules/@types/node/stream.d.ts:33

  #### Parameters

  - ##### chunk: any

  - ##### Optional encoding: undefined | string

  #### Returns boolean

### rawListeners

- rawListeners(event: string | symbol): Function[]

- Implementation of ReadableStream.rawListeners

  Inherited from EventEmitter.rawListeners

  Overrides EventEmitter.rawListeners

  - Defined in node_modules/@types/node/events.d.ts:21

  #### Parameters

  - ##### event: string | symbol

  #### Returns Function[]

### read

- read(size?: undefined | number): any

- Implementation of ReadableStream.read

  Inherited from Readable.read

  - Defined in node_modules/@types/node/stream.d.ts:25

  #### Parameters

  - ##### Optional size: undefined | number

  #### Returns any

### ref

- ref(): void

- Inherited from Socket.ref

  - Defined in node_modules/@types/node/net.d.ts:57

  #### Returns void

### removeAllListeners

- removeAllListeners(event?: string | symbol): this

- Implementation of ReadableStream.removeAllListeners

  Inherited from EventEmitter.removeAllListeners

  Overrides EventEmitter.removeAllListeners

  - Defined in node_modules/@types/node/events.d.ts:17

  #### Parameters

  - ##### Optional event: string | symbol

  #### Returns this

### removeListener

- removeListener(event: "close", listener: function): this
- removeListener(event: "data", listener: function): this
- removeListener(event: "end", listener: function): this
- removeListener(event: "readable", listener: function): this
- removeListener(event: "error", listener: function): this
- removeListener(event: string | symbol, listener: function): this

- Inherited from Readable.removeListener

  Overrides EventEmitter.removeListener

  - Defined in node_modules/@types/node/stream.d.ts:88

  #### Parameters

  - ##### event: "close"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Inherited from Readable.removeListener

  Overrides EventEmitter.removeListener

  - Defined in node_modules/@types/node/stream.d.ts:89

  #### Parameters

  - ##### event: "data"

  - ##### listener: function

    - - (chunk: any): void

      - #### Parameters

        - ##### chunk: any

        #### Returns void

  #### Returns this

- Inherited from Readable.removeListener

  Overrides EventEmitter.removeListener

  - Defined in node_modules/@types/node/stream.d.ts:90

  #### Parameters

  - ##### event: "end"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Inherited from Readable.removeListener

  Overrides EventEmitter.removeListener

  - Defined in node_modules/@types/node/stream.d.ts:91

  #### Parameters

  - ##### event: "readable"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Inherited from Readable.removeListener

  Overrides EventEmitter.removeListener

  - Defined in node_modules/@types/node/stream.d.ts:92

  #### Parameters

  - ##### event: "error"

  - ##### listener: function

    - - (err: Error): void

      - #### Parameters

        - ##### err: Error

        #### Returns void

  #### Returns this

- Inherited from Readable.removeListener

  Overrides EventEmitter.removeListener

  - Defined in node_modules/@types/node/stream.d.ts:93

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

    - - (...args: any[]): void

      - #### Parameters

        - ##### Rest ...args: any[]

        #### Returns void

  #### Returns this

### resume

- resume(): this

- Implementation of ReadableStream.resume

  Inherited from Socket.resume

  Overrides Readable.resume

  - Defined in node_modules/@types/node/net.d.ts:51

  #### Returns this

### setDefaultEncoding

- setDefaultEncoding(encoding: string): this

- Inherited from Duplex.setDefaultEncoding

  - Defined in node_modules/@types/node/stream.d.ts:217

  #### Parameters

  - ##### encoding: string

  #### Returns this

### setEncoding

- setEncoding(encoding?: undefined | string): this

- Inherited from Socket.setEncoding

  Overrides Readable.setEncoding

  - Defined in node_modules/@types/node/net.d.ts:49

  #### Parameters

  - ##### Optional encoding: undefined | string

  #### Returns this

### setKeepAlive

- setKeepAlive(enable?: undefined | false | true, initialDelay?: undefined | number): this

- Inherited from Socket.setKeepAlive

  - Defined in node_modules/@types/node/net.d.ts:54

  #### Parameters

  - ##### Optional enable: undefined | false | true

  - ##### Optional initialDelay: undefined | number

  #### Returns this

### setMaxListeners

- setMaxListeners(n: number): this

- Implementation of ReadableStream.setMaxListeners

  Inherited from EventEmitter.setMaxListeners

  Overrides EventEmitter.setMaxListeners

  - Defined in node_modules/@types/node/events.d.ts:18

  #### Parameters

  - ##### n: number

  #### Returns this

### setNoDelay

- setNoDelay(noDelay?: undefined | false | true): this

- Inherited from Socket.setNoDelay

  - Defined in node_modules/@types/node/net.d.ts:53

  #### Parameters

  - ##### Optional noDelay: undefined | false | true

  #### Returns this

### setTimeout

- setTimeout(timeout: number, callback?: undefined | function): this

- Inherited from Socket.setTimeout

  - Defined in node_modules/@types/node/net.d.ts:52

  #### Parameters

  - ##### timeout: number

  - ##### Optional callback: undefined | function

  #### Returns this

### uncork

- uncork(): void

- Inherited from Duplex.uncork

  - Defined in node_modules/@types/node/stream.d.ts:222

  #### Returns void

### unpipe

- unpipe(destination?: WritableStream): this

- Implementation of ReadableStream.unpipe

  Inherited from Readable.unpipe

  - Defined in node_modules/@types/node/stream.d.ts:30

  #### Parameters

  - ##### Optional destination: WritableStream

  #### Returns this

### unref

- unref(): void

- Inherited from Socket.unref

  - Defined in node_modules/@types/node/net.d.ts:56

  #### Returns void

### unshift

- unshift(chunk: any): void

- Inherited from Readable.unshift

  - Defined in node_modules/@types/node/stream.d.ts:31

  #### Parameters

  - ##### chunk: any

  #### Returns void

### wrap

- wrap(oldStream: ReadableStream): this

- Implementation of ReadableStream.wrap

  Inherited from Readable.wrap

  - Defined in node_modules/@types/node/stream.d.ts:32

  #### Parameters

  - ##### oldStream: ReadableStream

  #### Returns this

### write

- write(buffer: Buffer | Uint8Array | string, cb?: undefined | function): boolean
- write(str: Buffer | Uint8Array | string, encoding?: undefined | string, cb?: undefined | function): boolean

- Inherited from Socket.write

  Overrides Duplex.write

  - Defined in node_modules/@types/node/net.d.ts:41

  #### Parameters

  - ##### buffer: Buffer | Uint8Array | string

  - ##### Optional cb: undefined | function

  #### Returns boolean

- Inherited from Socket.write

  Overrides Duplex.write

  - Defined in node_modules/@types/node/net.d.ts:42

  #### Parameters

  - ##### str: Buffer | Uint8Array | string

  - ##### Optional encoding: undefined | string

  - ##### Optional cb: undefined | function

  #### Returns boolean

### Static listenerCount

- listenerCount(emitter: EventEmitter, event: string | symbol): number

- Inherited from EventEmitter.listenerCount

  - Defined in node_modules/@types/node/events.d.ts:7
  deprecated

    since v4.0.0

  #### Parameters

  - ##### emitter: EventEmitter

  - ##### event: string | symbol

  #### Returns number

Generated using TypeDoc