Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

EmitCauseOptions

EmitCauseOptions = { cause: CommandCause; effect?: string; } | { cause?: undefined; effect?: undefined; }

What a command caused: its cause and the predicted effect it confirms, which any emit may name. An effect is named only beside its cause, by type.

{ cause: CommandCause; effect?: string; }

Name Type Description
cause CommandCause The command that caused it, command.cause, from the command’s reader or a later system that kept it: the room tells the command’s sender alone, whose page reads the event’s cause as her request id, and no other page learns who acted.
effect? string The key of the predicted effect the command’s reader played on her page, which this event confirms, such as "cast": her page reads it as the event’s effect.

{ cause?: undefined; effect?: undefined; }