@vttforge/core / SocketHandlerObject
Interface: SocketHandlerObject<S, Result> ​
The object form of a handler.
Type Parameters ​
S ​
S extends Schema
Result ​
Result
Properties ​
input? ​
readonlyoptionalinput?:PayloadSchema<S>
The payload's shape, in the same fields a data model uses. A function, because fields() needs Foundry to be there. A payload that does not match does not reach run: a request is rejected with VTTF-0018, a message is dropped with a console warning.
run ​
readonlyrun: (payload,context) =>Result
Parameters ​
payload ​
context ​
Returns ​
Result