Skip to main content

Interface: ExtractIpcResponseDataOptions<T>

Defined in: shared/utils/ipcResponse.ts:45

Options for extractIpcResponseData.

Type Parametersโ€‹

Tโ€‹

T = unknown

Propertiesโ€‹

parse()?โ€‹

readonly optional parse: (data: unknown) => T

Defined in: shared/utils/ipcResponse.ts:54

Optional payload parser/validator.

Parametersโ€‹

dataโ€‹

unknown

Returnsโ€‹

T

Remarksโ€‹

When provided, the parser is used to convert/validate the raw data payload. This makes the extractor genuinely type-safe and also allows TypeScript to infer T from the parser.


requireData?โ€‹

readonly optional requireData: boolean

Defined in: shared/utils/ipcResponse.ts:70

When true, success: true responses must include a defined data payload.

Remarksโ€‹

Typed preload invokers expect main-process handlers to always include a payload (even if it is null). A missing payload usually indicates a handler bug.

Some channels may intentionally return undefined (e.g. "optional" lookups). Those callers should set this to false.

Default Valueโ€‹

true;