@my-swu/simulator-client / formatEventMessage
Function: formatEventMessage()
formatEventMessage(
command):ClientMessage
Defined in: packages/ts-sdk/src/messages.ts:99
Wraps one format-event command into a socket envelope.
Example:
ts
import { formatEventMessage } from '@my-swu/simulator-client'
// Format events drive out-of-game flows such as next-game readiness.
const clientMessage = formatEventMessage({ type: 'readyNextGame' })
console.log(clientMessage.type)Parameters
command
Example:
ts
import { formatEventMessage } from '@my-swu/simulator-client'
// Format events drive out-of-game flows such as next-game readiness.
const clientMessage = formatEventMessage({ type: 'readyNextGame' })
console.log(clientMessage.type)Returns
Example
ts
import { formatEventMessage } from '@my-swu/simulator-client'
const clientMessage = formatEventMessage({ type: 'readyNextGame' })
console.log(clientMessage.type)