Skip to content

Type Alias: QueryResponder<R, D>

ts
type QueryResponder<R, D> = (data?: D) => MaybePromise<R>;

Defined in: src/wirestate-react/types/queries.ts:17

Represents the function that answers a query.

Type Parameters

Type ParameterDefault typeDescription
RunknownThe result type of the query.
DunknownThe type of the data payload.

Parameters

ParameterTypeDescription
data?DOptional payload for the query.

Returns

MaybePromise<R>

The query result, possibly as a promise.