The type of the API request object
The type of the API response object
Optionalsignal?: AbortSignalAn AbortSignal used to cancel the request.
Aborting rejects the call with an SDKAbortError (its name is 'AbortError')
and cancels the underlying HTTP request, including while the SDK is waiting to retry
a rate-limited (429) response. Aborting a call that already completed has no effect.
To add a deadline, compose signals: AbortSignal.any([mine, AbortSignal.timeout(5000)]).
Keep only the latest search with createLatestRequest:
const latestSearch = createLatestRequest();
const search = await latestSearch.run((signal) => discoverPlaces({ query, signal }));
if (search.current) showResults(search.value);
OptionalvalidateRequest?: booleanWhether the SDK validates the request parameters against the expected schema before sending them.
The parameters every service call shares.