### Hierarchy

- EventEmitter
  - Worker

## Index

### Constructors

- constructor

### Properties

- stderr
- stdin
- stdout
- threadId
- defaultMaxListeners

### Methods

- addListener
- emit
- eventNames
- getMaxListeners
- listenerCount
- listeners
- off
- on
- once
- postMessage
- prependListener
- prependOnceListener
- rawListeners
- ref
- removeAllListeners
- removeListener
- setMaxListeners
- terminate
- unref
- listenerCount

## Constructors

### constructor

- new Worker(filename: string, options?: WorkerOptions): Worker

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

  #### Parameters

  - ##### filename: string

  - ##### Optional options: WorkerOptions

  #### Returns Worker

## Properties

### stderr

stderr: Readable

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

### stdin

stdin: Writable | null

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

### stdout

stdout: Readable

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

### threadId

threadId: number

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

### Static defaultMaxListeners

defaultMaxListeners: number

Inherited from EventEmitter.defaultMaxListeners

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

## Methods

### addListener

- addListener(event: "error", listener: function): this
- addListener(event: "exit", listener: function): this
- addListener(event: "message", listener: function): this
- addListener(event: "online", listener: function): this
- addListener(event: string | symbol, listener: function): this

- Overrides EventEmitter.addListener

  - Defined in node_modules/@types/node/worker_threads.d.ts:77

  #### Parameters

  - ##### event: "error"

  - ##### listener: function

    - - (err: Error): void

      - #### Parameters

        - ##### err: Error

        #### Returns void

  #### Returns this

- Overrides EventEmitter.addListener

  - Defined in node_modules/@types/node/worker_threads.d.ts:78

  #### Parameters

  - ##### event: "exit"

  - ##### listener: function

    - - (exitCode: number): void

      - #### Parameters

        - ##### exitCode: number

        #### Returns void

  #### Returns this

- Overrides EventEmitter.addListener

  - Defined in node_modules/@types/node/worker_threads.d.ts:79

  #### Parameters

  - ##### event: "message"

  - ##### listener: function

    - - (value: any): void

      - #### Parameters

        - ##### value: any

        #### Returns void

  #### Returns this

- Overrides EventEmitter.addListener

  - Defined in node_modules/@types/node/worker_threads.d.ts:80

  #### Parameters

  - ##### event: "online"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides EventEmitter.addListener

  - Defined in node_modules/@types/node/worker_threads.d.ts:81

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

### emit

- emit(event: "error", err: Error): boolean
- emit(event: "exit", exitCode: number): boolean
- emit(event: "message", value: any): boolean
- emit(event: "online"): boolean
- emit(event: string | symbol, ...args: any[]): boolean

- Overrides EventEmitter.emit

  - Defined in node_modules/@types/node/worker_threads.d.ts:83

  #### Parameters

  - ##### event: "error"

  - ##### err: Error

  #### Returns boolean

- Overrides EventEmitter.emit

  - Defined in node_modules/@types/node/worker_threads.d.ts:84

  #### Parameters

  - ##### event: "exit"

  - ##### exitCode: number

  #### Returns boolean

- Overrides EventEmitter.emit

  - Defined in node_modules/@types/node/worker_threads.d.ts:85

  #### Parameters

  - ##### event: "message"

  - ##### value: any

  #### Returns boolean

- Overrides EventEmitter.emit

  - Defined in node_modules/@types/node/worker_threads.d.ts:86

  #### Parameters

  - ##### event: "online"

  #### Returns boolean

- Overrides EventEmitter.emit

  - Defined in node_modules/@types/node/worker_threads.d.ts:87

  #### Parameters

  - ##### event: string | symbol

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

  #### Returns boolean

### eventNames

- eventNames(): Array<string | symbol>

- Inherited from EventEmitter.eventNames

  Overrides EventEmitter.eventNames

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

  #### Returns Array<string | symbol>

### getMaxListeners

- getMaxListeners(): number

- Inherited from EventEmitter.getMaxListeners

  Overrides EventEmitter.getMaxListeners

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

  #### Returns number

### listenerCount

- listenerCount(type: string | symbol): number

- 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[]

- 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: "error", listener: function): this
- off(event: "exit", listener: function): this
- off(event: "message", listener: function): this
- off(event: "online", listener: function): this
- off(event: string | symbol, listener: function): this

- Overrides EventEmitter.off

  - Defined in node_modules/@types/node/worker_threads.d.ts:119

  #### Parameters

  - ##### event: "error"

  - ##### listener: function

    - - (err: Error): void

      - #### Parameters

        - ##### err: Error

        #### Returns void

  #### Returns this

- Overrides EventEmitter.off

  - Defined in node_modules/@types/node/worker_threads.d.ts:120

  #### Parameters

  - ##### event: "exit"

  - ##### listener: function

    - - (exitCode: number): void

      - #### Parameters

        - ##### exitCode: number

        #### Returns void

  #### Returns this

- Overrides EventEmitter.off

  - Defined in node_modules/@types/node/worker_threads.d.ts:121

  #### Parameters

  - ##### event: "message"

  - ##### listener: function

    - - (value: any): void

      - #### Parameters

        - ##### value: any

        #### Returns void

  #### Returns this

- Overrides EventEmitter.off

  - Defined in node_modules/@types/node/worker_threads.d.ts:122

  #### Parameters

  - ##### event: "online"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides EventEmitter.off

  - Defined in node_modules/@types/node/worker_threads.d.ts:123

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

### on

- on(event: "error", listener: function): this
- on(event: "exit", listener: function): this
- on(event: "message", listener: function): this
- on(event: "online", listener: function): this
- on(event: string | symbol, listener: function): this

- Overrides EventEmitter.on

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

  #### Parameters

  - ##### event: "error"

  - ##### listener: function

    - - (err: Error): void

      - #### Parameters

        - ##### err: Error

        #### Returns void

  #### Returns this

- Overrides EventEmitter.on

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

  #### Parameters

  - ##### event: "exit"

  - ##### listener: function

    - - (exitCode: number): void

      - #### Parameters

        - ##### exitCode: number

        #### Returns void

  #### Returns this

- Overrides EventEmitter.on

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

  #### Parameters

  - ##### event: "message"

  - ##### listener: function

    - - (value: any): void

      - #### Parameters

        - ##### value: any

        #### Returns void

  #### Returns this

- Overrides EventEmitter.on

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

  #### Parameters

  - ##### event: "online"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides EventEmitter.on

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

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

### once

- once(event: "error", listener: function): this
- once(event: "exit", listener: function): this
- once(event: "message", listener: function): this
- once(event: "online", listener: function): this
- once(event: string | symbol, listener: function): this

- Overrides EventEmitter.once

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

  #### Parameters

  - ##### event: "error"

  - ##### listener: function

    - - (err: Error): void

      - #### Parameters

        - ##### err: Error

        #### Returns void

  #### Returns this

- Overrides EventEmitter.once

  - Defined in node_modules/@types/node/worker_threads.d.ts:96

  #### Parameters

  - ##### event: "exit"

  - ##### listener: function

    - - (exitCode: number): void

      - #### Parameters

        - ##### exitCode: number

        #### Returns void

  #### Returns this

- Overrides EventEmitter.once

  - Defined in node_modules/@types/node/worker_threads.d.ts:97

  #### Parameters

  - ##### event: "message"

  - ##### listener: function

    - - (value: any): void

      - #### Parameters

        - ##### value: any

        #### Returns void

  #### Returns this

- Overrides EventEmitter.once

  - Defined in node_modules/@types/node/worker_threads.d.ts:98

  #### Parameters

  - ##### event: "online"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides EventEmitter.once

  - Defined in node_modules/@types/node/worker_threads.d.ts:99

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

### postMessage

- postMessage(value: any, transferList?: Array<ArrayBuffer | MessagePort>): void

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

  #### Parameters

  - ##### value: any

  - ##### Optional transferList: Array<ArrayBuffer | MessagePort>

  #### Returns void

### prependListener

- prependListener(event: "error", listener: function): this
- prependListener(event: "exit", listener: function): this
- prependListener(event: "message", listener: function): this
- prependListener(event: "online", listener: function): this
- prependListener(event: string | symbol, listener: function): this

- Overrides EventEmitter.prependListener

  - Defined in node_modules/@types/node/worker_threads.d.ts:101

  #### Parameters

  - ##### event: "error"

  - ##### listener: function

    - - (err: Error): void

      - #### Parameters

        - ##### err: Error

        #### Returns void

  #### Returns this

- Overrides EventEmitter.prependListener

  - Defined in node_modules/@types/node/worker_threads.d.ts:102

  #### Parameters

  - ##### event: "exit"

  - ##### listener: function

    - - (exitCode: number): void

      - #### Parameters

        - ##### exitCode: number

        #### Returns void

  #### Returns this

- Overrides EventEmitter.prependListener

  - Defined in node_modules/@types/node/worker_threads.d.ts:103

  #### Parameters

  - ##### event: "message"

  - ##### listener: function

    - - (value: any): void

      - #### Parameters

        - ##### value: any

        #### Returns void

  #### Returns this

- Overrides EventEmitter.prependListener

  - Defined in node_modules/@types/node/worker_threads.d.ts:104

  #### Parameters

  - ##### event: "online"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides EventEmitter.prependListener

  - Defined in node_modules/@types/node/worker_threads.d.ts:105

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

### prependOnceListener

- prependOnceListener(event: "error", listener: function): this
- prependOnceListener(event: "exit", listener: function): this
- prependOnceListener(event: "message", listener: function): this
- prependOnceListener(event: "online", listener: function): this
- prependOnceListener(event: string | symbol, listener: function): this

- Overrides EventEmitter.prependOnceListener

  - Defined in node_modules/@types/node/worker_threads.d.ts:107

  #### Parameters

  - ##### event: "error"

  - ##### listener: function

    - - (err: Error): void

      - #### Parameters

        - ##### err: Error

        #### Returns void

  #### Returns this

- Overrides EventEmitter.prependOnceListener

  - Defined in node_modules/@types/node/worker_threads.d.ts:108

  #### Parameters

  - ##### event: "exit"

  - ##### listener: function

    - - (exitCode: number): void

      - #### Parameters

        - ##### exitCode: number

        #### Returns void

  #### Returns this

- Overrides EventEmitter.prependOnceListener

  - Defined in node_modules/@types/node/worker_threads.d.ts:109

  #### Parameters

  - ##### event: "message"

  - ##### listener: function

    - - (value: any): void

      - #### Parameters

        - ##### value: any

        #### Returns void

  #### Returns this

- Overrides EventEmitter.prependOnceListener

  - Defined in node_modules/@types/node/worker_threads.d.ts:110

  #### Parameters

  - ##### event: "online"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides EventEmitter.prependOnceListener

  - Defined in node_modules/@types/node/worker_threads.d.ts:111

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

### rawListeners

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

- Inherited from EventEmitter.rawListeners

  Overrides EventEmitter.rawListeners

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

  #### Parameters

  - ##### event: string | symbol

  #### Returns Function[]

### ref

- ref(): void

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

  #### Returns void

### removeAllListeners

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

- 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: "error", listener: function): this
- removeListener(event: "exit", listener: function): this
- removeListener(event: "message", listener: function): this
- removeListener(event: "online", listener: function): this
- removeListener(event: string | symbol, listener: function): this

- Overrides EventEmitter.removeListener

  - Defined in node_modules/@types/node/worker_threads.d.ts:113

  #### Parameters

  - ##### event: "error"

  - ##### listener: function

    - - (err: Error): void

      - #### Parameters

        - ##### err: Error

        #### Returns void

  #### Returns this

- Overrides EventEmitter.removeListener

  - Defined in node_modules/@types/node/worker_threads.d.ts:114

  #### Parameters

  - ##### event: "exit"

  - ##### listener: function

    - - (exitCode: number): void

      - #### Parameters

        - ##### exitCode: number

        #### Returns void

  #### Returns this

- Overrides EventEmitter.removeListener

  - Defined in node_modules/@types/node/worker_threads.d.ts:115

  #### Parameters

  - ##### event: "message"

  - ##### listener: function

    - - (value: any): void

      - #### Parameters

        - ##### value: any

        #### Returns void

  #### Returns this

- Overrides EventEmitter.removeListener

  - Defined in node_modules/@types/node/worker_threads.d.ts:116

  #### Parameters

  - ##### event: "online"

  - ##### listener: function

    - - (): void

      - #### Returns void

  #### Returns this

- Overrides EventEmitter.removeListener

  - Defined in node_modules/@types/node/worker_threads.d.ts:117

  #### Parameters

  - ##### event: string | symbol

  - ##### listener: function

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

      - #### Parameters

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

        #### Returns void

  #### Returns this

### setMaxListeners

- setMaxListeners(n: number): this

- Inherited from EventEmitter.setMaxListeners

  Overrides EventEmitter.setMaxListeners

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

  #### Parameters

  - ##### n: number

  #### Returns this

### terminate

- terminate(callback?: undefined | function): void

- - Defined in node_modules/@types/node/worker_threads.d.ts:75

  #### Parameters

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

  #### Returns void

### unref

- unref(): void

- - Defined in node_modules/@types/node/worker_threads.d.ts:74

  #### Returns void

### 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