Type Alias: OptionalAsyncQueryExecutor
ts
type OptionalAsyncQueryExecutor = <R, D, T>(type: T, data?: D) => Promise<Optional<R>>;Defined in: src/wirestate-react/types/queries.ts:101
Represents the function returned by useOptionalAsyncQueryExecutor.
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<Optional<R>>
A Promise resolving to the query result, or null if no handler was found.
Remarks
Typically returned by useOptionalAsyncQueryExecutor. Returns null when no handler is registered.