Skip to content

SharedWorkerUpdateMessagePort

Defined in: packages/@livestore/adapter-web/src/web-worker/common/worker-schema.ts:213

  • object & object & object & object & TaggedRequest<"UpdateMessagePort", SharedWorkerUpdateMessagePort, Encoded<object & object>, never, void, void, UnexpectedError, { _tag: "LiveStore.UnexpectedError"; cause: unknown; note?: string; payload?: any; }, never, this>

new SharedWorkerUpdateMessagePort(props, options?): SharedWorkerUpdateMessagePort

Defined in: node_modules/.pnpm/effect@3.18.0/node_modules/effect/dist/dts/Schema.d.ts:4265

LeaderWorkerInnerInitialMessage = LeaderWorkerInnerInitialMessage

Initial configuration for the leader worker. This replaces the previous two-phase SharedWorker handshake and is sent under the tab lock by the elected leader. Subsequent calls can omit changes and will simply rebind the port (join) without reinitializing the store.

"0.4.0-dev.14" = ...

MessagePort = Transferable.MessagePort

MakeOptions

SharedWorkerUpdateMessagePort

Schema.TaggedRequest<SharedWorkerUpdateMessagePort>()( 'UpdateMessagePort', { payload: { port: Transferable.MessagePort, // Version gate to prevent mixed LiveStore builds talking to the same SharedWorker liveStoreVersion: Schema.Literal(liveStoreVersion), /** * Initial configuration for the leader worker. This replaces the previous * two-phase SharedWorker handshake and is sent under the tab lock by the * elected leader. Subsequent calls can omit changes and will simply rebind * the port (join) without reinitializing the store. */ initial: LeaderWorkerInnerInitialMessage, }, success: Schema.Void, failure: UnexpectedError, }, ).constructor

readonly initial: LeaderWorkerInnerInitialMessage = LeaderWorkerInnerInitialMessage

Defined in: packages/@livestore/adapter-web/src/web-worker/common/worker-schema.ts:226

Initial configuration for the leader worker. This replaces the previous two-phase SharedWorker handshake and is sent under the tab lock by the elected leader. Subsequent calls can omit changes and will simply rebind the port (join) without reinitializing the store.

Schema.TaggedRequest<SharedWorkerUpdateMessagePort>()( 'UpdateMessagePort', { payload: { port: Transferable.MessagePort, // Version gate to prevent mixed LiveStore builds talking to the same SharedWorker liveStoreVersion: Schema.Literal(liveStoreVersion), /** * Initial configuration for the leader worker. This replaces the previous * two-phase SharedWorker handshake and is sent under the tab lock by the * elected leader. Subsequent calls can omit changes and will simply rebind * the port (join) without reinitializing the store. */ initial: LeaderWorkerInnerInitialMessage, }, success: Schema.Void, failure: UnexpectedError, }, ).initial


readonly liveStoreVersion: "0.4.0-dev.14"

Defined in: packages/@livestore/adapter-web/src/web-worker/common/worker-schema.ts:219

Schema.TaggedRequest<SharedWorkerUpdateMessagePort>()( 'UpdateMessagePort', { payload: { port: Transferable.MessagePort, // Version gate to prevent mixed LiveStore builds talking to the same SharedWorker liveStoreVersion: Schema.Literal(liveStoreVersion), /** * Initial configuration for the leader worker. This replaces the previous * two-phase SharedWorker handshake and is sent under the tab lock by the * elected leader. Subsequent calls can omit changes and will simply rebind * the port (join) without reinitializing the store. */ initial: LeaderWorkerInnerInitialMessage, }, success: Schema.Void, failure: UnexpectedError, }, ).liveStoreVersion


readonly port: MessagePort = Transferable.MessagePort

Defined in: packages/@livestore/adapter-web/src/web-worker/common/worker-schema.ts:217

Schema.TaggedRequest<SharedWorkerUpdateMessagePort>()( 'UpdateMessagePort', { payload: { port: Transferable.MessagePort, // Version gate to prevent mixed LiveStore builds talking to the same SharedWorker liveStoreVersion: Schema.Literal(liveStoreVersion), /** * Initial configuration for the leader worker. This replaces the previous * two-phase SharedWorker handshake and is sent under the tab lock by the * elected leader. Subsequent calls can omit changes and will simply rebind * the port (join) without reinitializing the store. */ initial: LeaderWorkerInnerInitialMessage, }, success: Schema.Void, failure: UnexpectedError, }, ).port