# Class: MainThreadToWorker
configurator-core/src/configurator.
# Hierarchy
-
↳
MainThreadToWorker
# Table of contents
# Constructors
# Methods
# Constructors
# constructor
• new MainThreadToWorker(callback
, eventListener
)
# Parameters
Name | Type |
---|---|
callback | CommunicationInterfaceCallback |
eventListener | Worker | ServiceWorker | ServiceWorkerContainer |
# Overrides
CommunicationInterface.constructor
# Defined in
packages/workers/src/main-thread-to-worker.ts:16 (opens new window)
# Methods
# handleEvent
▸ handleEvent(e
): void
# Parameters
Name | Type |
---|---|
e | MessageEvent <any > |
# Returns
void
# Inherited from
CommunicationInterface.handleEvent
# Defined in
packages/workers/src/communication-interface.ts:66 (opens new window)
# resolvePromises
▸ resolvePromises(conversationId
, data
): void
# Parameters
Name | Type |
---|---|
conversationId | number |
data | any [] |
# Returns
void
# Defined in
packages/workers/src/main-thread-to-worker.ts:53 (opens new window)
# sendToWorker
▸ sendToWorker(command
, data?
, resolve?
, reject?
): void
# Parameters
Name | Type | Default value |
---|---|---|
command | WORKER_MESSAGE | undefined |
data | any | null |
resolve? | (...args : any []) => void | undefined |
reject? | (...args : any []) => void | undefined |
# Returns
void
# Defined in
packages/workers/src/main-thread-to-worker.ts:23 (opens new window)
# setEventPoster
▸ setEventPoster(eventPoster
): void
# Parameters
Name | Type |
---|---|
eventPoster | any |
# Returns
void
# Inherited from
CommunicationInterface.setEventPoster
# Defined in
packages/workers/src/communication-interface.ts:62 (opens new window)