Constructors

Properties

messagingContext: MessagingContext

Methods

  • Send a 'fire-and-forget' message.

    Parameters

    • name: string
    • Optionaldata: Record<string, any> = {}

    Returns void

    const messaging = new Messaging(config)
    messaging.notify("foo", {bar: "baz"})
  • Send a request, and wait for a response

    Parameters

    • name: string
    • Optionaldata: Record<string, any> = {}

    Returns Promise<any>

    const messaging = new Messaging(config)
    const response = await messaging.request("foo", {bar: "baz"})
  • Parameters

    • name: string
    • callback: (value: unknown) => void

    Returns () => void