MakeWorkerOptions
MakeWorkerOptions<
TEnv
> =object
Defined in: packages/@livestore/sync-cf/src/cf-worker/worker.ts:51
Type Parameters
Section titled “Type Parameters”Properties
Section titled “Properties”durableObject?
Section titled “durableObject?”
optional
durableObject:object
Defined in: packages/@livestore/sync-cf/src/cf-worker/worker.ts:60
optional
name:ExtractDurableObjectKeys
<TEnv
>
Needs to match the binding name from the wrangler config
Default
Section titled “Default”'WEBSOCKET_SERVER'
enableCORS?
Section titled “enableCORS?”
optional
enableCORS:boolean
Defined in: packages/@livestore/sync-cf/src/cf-worker/worker.ts:59
Default
Section titled “Default”false
validatePayload()?
Section titled “validatePayload()?”
optional
validatePayload: (payload
,context
) =>void
|Promise
<void
>
Defined in: packages/@livestore/sync-cf/src/cf-worker/worker.ts:57
Validates the payload during WebSocket connection establishment.
Note: This runs only at connection time, not for individual push events.
For push event validation, use the onPush
callback in the durable object.
Parameters
Section titled “Parameters”payload
Section titled “payload”Schema.JsonValue
| undefined
context
Section titled “context”storeId
Section titled “storeId”string
Returns
Section titled “Returns”void
| Promise
<void
>