Skip to content

@statesync/electron


@statesync/electron / ElectronBroadcasterOptions

Interface: ElectronBroadcasterOptions

Defined in: main.ts:27

Configuration options for createElectronBroadcaster.

Properties

channel?

ts
optional channel: string;

Defined in: main.ts:45

Override the default IPC channel name for invalidation events.

Defaults to statesync:<topic>:invalidated (produced by invalidationChannel).


getTargets()

ts
getTargets: () => ElectronWebContentsLike[];

Defined in: main.ts:39

Returns the list of webContents targets to broadcast invalidation events to.

Called on every ElectronBroadcasterHandle.invalidate invocation. The returned array is defensively copied (.slice()) before iteration, so it is safe to return a live mutable reference (e.g. from a Set or window manager).

Returns

ElectronWebContentsLike[]

An array of ElectronWebContentsLike instances.


topic

ts
topic: string;

Defined in: main.ts:29

The sync topic identifier (e.g. "user-profile").

Released under the MIT License.