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 Parameter | Default type | Description |
|---|---|---|
R | unknown | The result type of the query. |
D | unknown | The type of the data payload. |
T extends QueryType | QueryType | The query identifier type. |
Parameters
| Parameter | Type | Description |
|---|---|---|
type | T | The query identifier. |
data? | D | Optional payload for the query. |
Returns
Promise<R>
A Promise resolving to the query result.
Remarks
Typically returned by useAsyncQueryExecutor.