Skip to main content

Interface: GuardedIpcServiceHelpers

Defined in: src/services/utils/createIpcServiceHelpers.ts:164

Typed wrapper utilities for building guarded IPC services.

Remarksโ€‹

Returned by getIpcServiceHelpers. Consumers typically spread these helpers into service objects exposed from src/services.

Propertiesโ€‹

ensureInitializedโ€‹

ensureInitialized: () => Promise<void>;

Defined in: src/services/utils/createIpcServiceHelpers.ts:166

Ensures the preload bridge is ready before IPC calls.

Returnsโ€‹

Promise<void>


wrapโ€‹

wrap: <Args, Result>(
methodName: string,
handler: (api: ElectronAPI, ...args: Args) => Promise<Result>
) =>
(...args: Args) =>
Promise<Result>;

Defined in: src/services/utils/createIpcServiceHelpers.ts:172

Wraps a handler so it automatically waits for initialization and logs failures using a consistent format.

Type Parametersโ€‹

Argsโ€‹

Args extends unknown[]

Resultโ€‹

Result

Parametersโ€‹

methodNameโ€‹

string

handlerโ€‹

(api: ElectronAPI, ...args: Args) => Promise<Result>

Returnsโ€‹

(...args: Args) => Promise<Result>