Skip to content

Type Alias: AsyncQueryExecutor

ts
type AsyncQueryExecutor = <R, D, T>(type: T, data?: D) => Promise<R>;

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

Represents the function returned by useAsyncQueryExecutor.

Type Parameters

Type ParameterDefault typeDescription
RunknownThe result type of the query.
DunknownThe type of the data payload.
T extends QueryTypeQueryTypeThe query identifier type.

Parameters

ParameterTypeDescription
typeTThe query identifier.
data?DOptional payload for the query.

Returns

Promise<R>

A Promise resolving to the query result.

Remarks

Typically returned by useAsyncQueryExecutor.