Skip to content

Type Alias: QueryExecutor

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

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

Represents the function returned by useQueryExecutor.

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

R

The synchronous query result.

Remarks

Typically returned by useQueryExecutor.