Options
All
  • Public
  • Public/Protected
  • All
Menu

A Message object represents a single message on the message bus. Messages can contain either a data payload or an error payload. Messages can be a command, or a response. An error notification is always a response. The content of the payload is opaque and its format is only decodable by the sender(s) and the receiver(s)

This has beeen simplified to remove TypeScript getters and setters, this is because, when using postMesssage() and various other mechanisms because of The structured clone algorithm issue and deserialzing object properties. You end up with an untyped object that only has the private properties ('_privateVar') exposed, none of the methods either. Causes a dirty object that breaks most typed logic at runtime.

https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm

Hierarchy

  • MessageHandlerConfig

Index

Constructors

  • new MessageHandlerConfig(sendChannel: string, body: any, singleResponse?: boolean, returnChannel?: string): MessageHandlerConfig

Properties

body: any
isHandlerConfig: boolean = true
returnChannel: string
sendChannel: string
singleResponse: boolean

Generated using TypeDoc