Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PlatformWorker

Encapsulates a runtime agnostic worker thread.

Hierarchy

  • PlatformWorker

Index

Properties

onError: TypedEvent<{ error: string | Error }>
onExit: TypedEvent<{ exitCode: number }>

Methods

  • postMessage(data: Record<string, unknown>): void
  • Posts a message to the worker.

    Parameters

    • data: Record<string, unknown>

      The data to post into the worker.

    Returns void

  • terminate(): void
  • Signals the current worker to terminate immediately.

    Returns void

Generated using TypeDoc