eventMessage()
Creates an event message.
Import
Section titled “Import”import { eventMessage } from "@graphrefly/ts/messaging";Signature
Section titled “Signature”function eventMessage( type: string, payload: T, opts: EventMessageOptions,): EventMessage<T>Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
type | string | type value used by the helper. |
payload | T | Payload to lower or wrap. |
opts | EventMessageOptions | Options that configure the helper. |
Returns
Section titled “Returns”The event message result.
Example
Section titled “Example”import { eventMessage } from "@graphrefly/ts/messaging";Source
Section titled “Source”packages/ts/src/messaging/event-message.ts