Packages@robojs/sync
SyncHandlerModule<T, ClientData>
Interface: SyncHandlerModule<T, ClientData>
A sync handler module can export any combination of these.
Type Parameters
| Type Parameter | Default type |
|---|---|
T | unknown |
ClientData | unknown |
Indexable
[key: string]: unknownProperties
| Property | Type | Description |
|---|---|---|
onUpdate? | OnUpdateHandler<T, ClientData> | Called after successful update |
schema? | unknown | Schema for validation (Zod or built-in format) |
transform? | TransformHandler<T, ClientData> | Transform state before broadcasting |
validate? | ValidateHandler<T, ClientData> | Validate incoming updates |
