@vttforge/core / SocketMessageHandler
Type Alias: SocketMessageHandler
SocketMessageHandler =
SocketMessageRun| {from?:SocketSender;run:SocketMessageRun; }
One thing a package can be told to do.
A bare function is the same as { run }, which is what most handlers are. Use the object form when the message may come from someone who is not a Gamemaster.
Union Members
Type Literal
{ from?: SocketSender; run: SocketMessageRun; }
from?
readonlyoptionalfrom?:SocketSender
Who may trigger it. Default 'gm'. 'anyone' is for messages that only touch the receiving client, and even then the handler is the last line: the sender chose the payload.
run
readonlyrun:SocketMessageRun