@sqlrooms/room-store / CommandSliceState
Type Alias: CommandSliceState<RS>
CommandSliceState<
RS> =object
Type Parameters
| Type Parameter | Default type |
|---|---|
RS extends BaseRoomStoreState | BaseRoomStoreState |
Properties
commands
commands:
object
| Name | Type |
|---|---|
registry | Record<string, RegisteredRoomCommand<RS>> |
ownerToCommandIds | Record<string, string[]> |
registerCommand() | (owner, command) => void |
registerCommands() | (owner, commands) => void |
unregisterCommand() | (commandId) => void |
unregisterCommands() | (owner) => void |
getCommand() | (commandId) => RegisteredRoomCommand<RS> | undefined |
listCommands() | (options?) => RoomCommandDescriptor[] |
invokeCommand() | (commandId, input?, invocation?) => Promise<RoomCommandResult> |
executeCommand() | (commandId, input?, invocation?) => Promise<void> |
